diff options
author | Oliver Schramm <oliver.schramm97@gmail.com> | 2016-03-05 17:13:28 +0100 |
---|---|---|
committer | Oliver Schramm <oliver.schramm97@gmail.com> | 2016-03-06 16:11:29 +0100 |
commit | b77856a903869658b724b431b34658319189e38f (patch) | |
tree | 791fdf21661e478b273482d4ed5465abcdcf8e3f /phpBB/phpbb | |
parent | ad23b2330c765ebbafe96ba3f68543284fbed456 (diff) | |
download | forums-b77856a903869658b724b431b34658319189e38f.tar forums-b77856a903869658b724b431b34658319189e38f.tar.gz forums-b77856a903869658b724b431b34658319189e38f.tar.bz2 forums-b77856a903869658b724b431b34658319189e38f.tar.xz forums-b77856a903869658b724b431b34658319189e38f.zip |
[ticket/14514] Don't skip users when converting passwords
PHPBB3-14514
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r-- | phpBB/phpbb/db/migration/data/v310/passwords_convert_p1.php | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/phpBB/phpbb/db/migration/data/v310/passwords_convert_p1.php b/phpBB/phpbb/db/migration/data/v310/passwords_convert_p1.php index aad8e44681..295f2d2a14 100644 --- a/phpBB/phpbb/db/migration/data/v310/passwords_convert_p1.php +++ b/phpBB/phpbb/db/migration/data/v310/passwords_convert_p1.php @@ -56,19 +56,16 @@ class passwords_convert_p1 extends \phpbb\db\migration\migration { // Use $CP$ prefix for passwords that need to // be converted and set pass convert to false. - $update_users[$user_id] = array( - 'user_password' => '$CP$' . $row['user_password'], - 'user_pass_convert' => 0, - ); + $update_users[$user_id] = '$CP$' . $row['user_password']; } } $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 - SET ' . $this->db->sql_build_array('UPDATE', $user_data) . ' - WHERE user_id = ' . $user_id; + $sql = 'UPDATE ' . $this->table_prefix . "users + SET user_password = '" . $this->db->sql_escape($user_password) . "' + WHERE user_id = $user_id"; $this->sql_query($sql); } |