Upload via GUI (360 Dateien)

This commit is contained in:
2026-10-30 21:49:58 +00:00
parent aed0db39ba
commit 91ae4659b5
10 changed files with 711 additions and 9 deletions
+7
View File
@@ -52,7 +52,9 @@ function staff_login(array $staff): void
session_regenerate_id(true);
$_SESSION['staff_id'] = $staff['id'];
$_SESSION['staff_last_activity'] = time();
$_SESSION['staff_login_at'] = time();
staff_touch_activity(get_db(), (int) $staff['id']);
login_guard_success($staff, 'web');
}
function staff_logout(): void
@@ -77,6 +79,11 @@ function current_staff(): ?array
$stmt = get_db()->prepare('SELECT * FROM staff WHERE id = ? AND is_active = 1');
$stmt->execute([$_SESSION['staff_id']]);
$staff = $stmt->fetch();
// „Das war ich nicht“ (Anmelde-Wächter): ältere Browser-Sitzungen dieses Kontos sind ungültig
if ($staff && login_guard_session_revoked((int) $staff['id'])) {
unset($_SESSION['staff_id']);
return null;
}
return $cache = ($staff ?: null);
}