diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index a78bf1d88f..68c32cc969 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -316,7 +316,7 @@ App::init() /** * Update user last activity */ - if (!$user->isEmpty()) { + if (!empty($user->getId())) { $accessedAt = $user->getAttribute('accessedAt', ''); if (DateTime::formatTz(DateTime::addSeconds(new \DateTime(), -APP_USER_ACCESS)) > $accessedAt) { $user->setAttribute('accessedAt', DateTime::now());