Skip to content
Snippets Groups Projects
Commit 22f0ba52 authored by Angie Byron's avatar Angie Byron
Browse files

#1007504 by carlos8f, pioterw: Fixed Rehashed passwords after Drupal 6 upgrade fail

parent f31175dc
No related branches found
No related tags found
No related merge requests found
......@@ -378,6 +378,15 @@ class BasicUpgradePath extends UpgradePathTestCase {
'pass_raw' => 'admin',
));
// The previous login should've triggered a password rehash, so login one
// more time to make sure the new hash is readable.
$this->drupalLogout();
$this->drupalLogin((object) array(
'uid' => 1,
'name' => 'admin',
'pass_raw' => 'admin',
));
// Test that the site name is correctly displayed.
$this->assertText('Drupal 6', t('The site name is correctly displayed.'));
......
......@@ -2180,10 +2180,7 @@ function user_authenticate($name, $password) {
// Update user to new password scheme if needed.
if (user_needs_new_hash($account)) {
$new_hash = user_hash_password($password);
if ($new_hash) {
user_save($account, array('pass' => $new_hash));
}
user_save($account, array('pass' => $password));
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment