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();
|
validateSessionDomain();
|
||||||
|
|
||||||
if (!isset($_SESSION['user_id'])) {
|
if (!isset($_SESSION['user_id'])) {
|
||||||
$basePath = dirname($_SERVER['PHP_SELF']);
|
header('Location: /login.php');
|
||||||
if ($basePath === '/' || $basePath === '\\') {
|
|
||||||
$basePath = '';
|
|
||||||
}
|
|
||||||
header('Location: ' . $basePath . '/login.php');
|
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user