Close login gap

This commit is contained in:
Thanakorn S
2026-05-25 15:34:12 +07:00
parent 8027ab569e
commit 3c9475f3fa
2 changed files with 28 additions and 27 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ require_once '../../../assets/utils/db_auth.php';
// Clear session token so the account is free to log in elsewhere immediately
if (!empty($_SESSION['login_user_id'])) {
$pdo1->prepare("UPDATE user SET session_token = NULL, session_token_at = NULL WHERE user_id = :uid")
$pdo1->prepare("UPDATE user SET session_token = NULL, session_token_at = NULL, session_last_seen = NULL WHERE user_id = :uid")
->execute([':uid' => (int)$_SESSION['login_user_id']]);
}