fix: [UI] Correctly display last login time

Until now, we were showing the "one before last" login time, this fixes the issue
pull/7374/head
Loïc Fortemps 2021-04-27 15:42:01 +02:00 committed by GitHub
parent b88850bf6e
commit 5eb67f0fd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1245,9 +1245,9 @@ class UsersController extends AppController
),
'recursive' => -1
));
$lastUserLogin = $user['User']['last_login'];
unset($user['User']['password']);
$this->User->updateLoginTimes($user['User']);
$lastUserLogin = $user['User']['last_login'];
$this->User->Behaviors->enable('SysLogLogable.SysLogLogable');
if ($lastUserLogin) {
$readableDatetime = (new DateTime())->setTimestamp($lastUserLogin)->format('D, d M y H:i:s O'); // RFC822