Compare commits
No commits in common. "cbd55cec2d326cad97925dbce2efdfb6087c9a62" and "129c0c12644da15e676206d8fa3f9ebba42213bc" have entirely different histories.
cbd55cec2d
...
129c0c1264
|
@ -74,11 +74,11 @@
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
$until = time() + self::$tokenLifetime;
|
$until = time() + self::$tokenLifetime;
|
||||||
$hash = hash('sha256', $login.'|'.$user->password.'|'.$until.'|'.self::$secret);
|
$hash = hash('sha256', $login.'|'.$password.'|'.$until.'|'.self::$secret);
|
||||||
|
|
||||||
self::updateOnline($login);
|
self::updateOnline($login);
|
||||||
|
|
||||||
return rtrim(strtr(base64_encode($login.'|'.$user->password.'|'.$until.'|'.$hash), '+/', '-_'), '=');
|
return implode('|', rtrim(strtr(base64_encode($login.'|'.$password.'|'.$until.'|'.$hash), '+/', '-_'), '='));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function get($login) {
|
public static function get($login) {
|
||||||
|
|
|
@ -15,13 +15,7 @@
|
||||||
else {
|
else {
|
||||||
$data = [
|
$data = [
|
||||||
'error' => false,
|
'error' => false,
|
||||||
'data' => [
|
'data' => $user,
|
||||||
'id' => $user->id,
|
|
||||||
'login' => $user->login,
|
|
||||||
'info' => $user->info,
|
|
||||||
'reg_dt' => $user->reg_dt,
|
|
||||||
'online_dt' => $user->online_dt,
|
|
||||||
],
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue