mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-29 17:56:19 +00:00
fix: style
This commit is contained in:
parent
8703631db8
commit
2af4a869f3
@ -80,7 +80,9 @@ class Auth {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($myUser) {
|
if ($myUser) {
|
||||||
if (!isset($_SESSION['last_login'])) $_SESSION['last_login'] = $myUser['last_login'];
|
if (!isset($_SESSION['last_login'])) {
|
||||||
|
$_SESSION['last_login'] = $myUser['last_login'];
|
||||||
|
}
|
||||||
if ((time() - $_SESSION['last_login']) > 60 * 60 * 24 * 7) { // 1 week
|
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