diff options
author | Marc Alexander <admin@m-a-styles.de> | 2014-10-26 17:14:34 -0700 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2014-10-26 17:14:34 -0700 |
commit | 6cc5160d6044a90636c804a14de5c333ef2f123d (patch) | |
tree | d7dfeaaf0982ad7b43514902c626023c0dce9a73 /phpBB/phpbb/db | |
parent | 51251293abb40e04e290df2f937504cfaabde43b (diff) | |
download | forums-6cc5160d6044a90636c804a14de5c333ef2f123d.tar forums-6cc5160d6044a90636c804a14de5c333ef2f123d.tar.gz forums-6cc5160d6044a90636c804a14de5c333ef2f123d.tar.bz2 forums-6cc5160d6044a90636c804a14de5c333ef2f123d.tar.xz forums-6cc5160d6044a90636c804a14de5c333ef2f123d.zip |
[ticket/13225] Use passwords manager instead of phpbb_hash in migration
PHPBB3-13225
Diffstat (limited to 'phpBB/phpbb/db')
-rw-r--r-- | phpBB/phpbb/db/migration/data/v30x/release_3_0_5_rc1.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_5_rc1.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_5_rc1.php index f593c32181..cac9c58a7c 100644 --- a/phpBB/phpbb/db/migration/data/v30x/release_3_0_5_rc1.php +++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_5_rc1.php @@ -55,6 +55,9 @@ class release_3_0_5_rc1 extends \phpbb\db\migration\migration public function hash_old_passwords() { + global $phpbb_container; + + $passwords_manager = $phpbb_container->get('passwords.manager'); $sql = 'SELECT user_id, user_password FROM ' . $this->table_prefix . 'users WHERE user_pass_convert = 1'; @@ -65,7 +68,7 @@ class release_3_0_5_rc1 extends \phpbb\db\migration\migration if (strlen($row['user_password']) == 32) { $sql_ary = array( - 'user_password' => phpbb_hash($row['user_password']), + 'user_password' => $passwords_manager->hash($row['user_password'], 'passwords.driver.salted_md5'), ); $this->sql_query('UPDATE ' . $this->table_prefix . 'users SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . ' WHERE user_id = ' . $row['user_id']); |