From 8703631db86ac46efcc2f4e160a7d5def2646a7a Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Tue, 4 Oct 2022 16:33:24 +0800 Subject: [PATCH] fix: c30374732e394d1cce459d7ccbf6a5448e562028 --- web/app/models/Auth.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; }