1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 06:38:00 +02:00

Issue #595 - Should fix corrupt cookie issue after password rehashing.

This commit is contained in:
Cameron
2016-06-06 20:18:49 -07:00
parent 127271e9fc
commit f88abd1a00

View File

@@ -213,11 +213,13 @@ class userlogin
{ // May want to rewrite password using salted hash (or whatever the preferred method is) - $pass_result has the value to write { // May want to rewrite password using salted hash (or whatever the preferred method is) - $pass_result has the value to write
// If login by email address also allowed, will have to write that value too // If login by email address also allowed, will have to write that value too
// $sql->update('user',"`user_password` = '{$pass_result}' WHERE `user_id`=".intval($this->userData['user_id'])); // $sql->update('user',"`user_password` = '{$pass_result}' WHERE `user_id`=".intval($this->userData['user_id']));
if($this->userMethods->rehashPassword($this->userData,$userpass)!==false) $reHashedPass = $this->userMethods->rehashPassword($this->userData,$userpass);
if($reHashedPass !==false)
{ {
$log = e107::getLog(); $log = e107::getLog();
$auditLog = "User Password ReHashed"; $auditLog = "User Password ReHashed";
$log->user_audit(USER_AUDIT_LOGIN, $auditLog, $this->userData['user_id'], $this->userData['user_name']); $log->user_audit(USER_AUDIT_LOGIN, $auditLog, $this->userData['user_id'], $this->userData['user_name']);
$this->userData['user_password'] = $reHashedPass;
} }
} }