mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-26 07:08:41 +00:00
fix: c30374732e
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
8a288ceff5
commit
8703631db8
@ -80,7 +80,8 @@ class Auth {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($myUser) {
|
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();
|
Auth::logout();
|
||||||
$myUser = null;
|
$myUser = null;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user