Compare commits

..

No commits in common. "cbd55cec2d326cad97925dbce2efdfb6087c9a62" and "129c0c12644da15e676206d8fa3f9ebba42213bc" have entirely different histories.

2 changed files with 3 additions and 9 deletions

View File

@ -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) {

View File

@ -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,
],
]; ];
} }
} }