diff --git a/web/app/models/Auth.php b/web/app/models/Auth.php index 6e99c2d..58dfa13 100644 --- a/web/app/models/Auth.php +++ b/web/app/models/Auth.php @@ -80,7 +80,8 @@ class Auth { } if ($myUser) { - if (!isset($_SESSION['last_login']) || (time() - $_SESSION['last_login']) > 60 * 60 * 24 * 7) { // 1 week + if (!isset($_SESSION['last_login'])) $_SESSION['last_login'] = $myUser['last_login']; + if ((time() - $_SESSION['last_login']) > 60 * 60 * 24 * 7) { // 1 week Auth::logout(); $myUser = null; }