Commit 075c5477 by Daniel Ruf

update password if a rehash is needed

parent 6706e581
...@@ -78,7 +78,8 @@ ...@@ -78,7 +78,8 @@
){ // login and redirect ){ // login and redirect
require_once QA_INCLUDE_DIR.'app/users.php'; require_once QA_INCLUDE_DIR.'app/users.php';
if($haspasswordold) qa_db_user_set_password($inuserid, $inpassword); // upgrade password or rehash, when options like the cost parameter changed
if($haspasswordold || password_needs_rehash($userinfo['passhash'], PASSWORD_BCRYPT)) qa_db_user_set_password($inuserid, $inpassword);
qa_set_logged_in_user($inuserid, $userinfo['handle'], !empty($inremember)); qa_set_logged_in_user($inuserid, $userinfo['handle'], !empty($inremember));
$topath=qa_get('to'); $topath=qa_get('to');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment