fix: style

This commit is contained in:
Baoshuo Ren 2022-10-04 16:35:07 +08:00
parent 8703631db8
commit 2af4a869f3
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A

View File

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