Fix: Redirección correcta al login al expirar sesión

This commit is contained in:
2026-02-19 14:22:31 -06:00
parent b79a03e379
commit a4960b90e8

6
includes/session_check.php Executable file → Normal file
View File

@@ -24,11 +24,7 @@ function checkSession(): void
validateSessionDomain();
if (!isset($_SESSION['user_id'])) {
$basePath = dirname($_SERVER['PHP_SELF']);
if ($basePath === '/' || $basePath === '\\') {
$basePath = '';
}
header('Location: ' . $basePath . '/login.php');
header('Location: /login.php');
exit;
}
}