mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Merge branch '3.1.x' into 3.2.x
This commit is contained in:
commit
c00e45d30e
1 changed files with 5 additions and 8 deletions
|
@ -56,19 +56,16 @@ class passwords_convert_p1 extends \phpbb\db\migration\migration
|
||||||
{
|
{
|
||||||
// Use $CP$ prefix for passwords that need to
|
// Use $CP$ prefix for passwords that need to
|
||||||
// be converted and set pass convert to false.
|
// be converted and set pass convert to false.
|
||||||
$update_users[$user_id] = array(
|
$update_users[$user_id] = '$CP$' . $row['user_password'];
|
||||||
'user_password' => '$CP$' . $row['user_password'],
|
|
||||||
'user_pass_convert' => 0,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->db->sql_freeresult($result);
|
$this->db->sql_freeresult($result);
|
||||||
|
|
||||||
foreach ($update_users as $user_id => $user_data)
|
foreach ($update_users as $user_id => $user_password)
|
||||||
{
|
{
|
||||||
$sql = 'UPDATE ' . $this->table_prefix . 'users
|
$sql = 'UPDATE ' . $this->table_prefix . "users
|
||||||
SET ' . $this->db->sql_build_array('UPDATE', $user_data) . '
|
SET user_password = '" . $this->db->sql_escape($user_password) . "'
|
||||||
WHERE user_id = ' . $user_id;
|
WHERE user_id = $user_id";
|
||||||
$this->sql_query($sql);
|
$this->sql_query($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue