Fix auth in User class
This commit is contained in:
parent
129c0c1264
commit
913db80c30
|
@ -74,11 +74,11 @@
|
|||
return false;
|
||||
|
||||
$until = time() + self::$tokenLifetime;
|
||||
$hash = hash('sha256', $login.'|'.$password.'|'.$until.'|'.self::$secret);
|
||||
$hash = hash('sha256', $login.'|'.$user->password.'|'.$until.'|'.self::$secret);
|
||||
|
||||
self::updateOnline($login);
|
||||
|
||||
return implode('|', rtrim(strtr(base64_encode($login.'|'.$password.'|'.$until.'|'.$hash), '+/', '-_'), '='));
|
||||
return rtrim(strtr(base64_encode($login.'|'.$user->password.'|'.$until.'|'.$hash), '+/', '-_'), '=');
|
||||
}
|
||||
|
||||
public static function get($login) {
|
||||
|
|
Loading…
Reference in New Issue