1
1
mirror of https://github.com/renbaoshuo/S2OJ.git synced 2025-03-30 04:17:02 +00:00

fix: c30374732e394d1cce459d7ccbf6a5448e562028

This commit is contained in:
Baoshuo Ren 2022-10-04 16:33:24 +08:00
parent 8a288ceff5
commit 8703631db8
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A

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