fix: c30374732e
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Baoshuo Ren 2022-10-04 16:44:14 +08:00
parent fd9cc2b302
commit 354c417737
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A

View File

@ -81,7 +81,7 @@ class Auth {
if ($myUser) { if ($myUser) {
if (!isset($_SESSION['last_login'])) { if (!isset($_SESSION['last_login'])) {
$_SESSION['last_login'] = $myUser['last_login']; $_SESSION['last_login'] = strtotime($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();