Fix: Redirección correcta al login al expirar sesión
This commit is contained in:
6
includes/session_check.php
Executable file → Normal file
6
includes/session_check.php
Executable file → Normal 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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user