Update check_login.php If standard

This commit is contained in:
Hugo Sampaio 2024-05-04 19:23:39 -03:00 committed by GitHub
parent bab66bf769
commit 17eb51bd54
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -18,10 +18,11 @@ if (!isset($config_enable_setup) || $config_enable_setup == 1) {
// Check user is logged in with a valid session
if (!isset($_SESSION['logged']) || !$_SESSION['logged']) {
if($_SERVER["REQUEST_URI"] == "/")
if ($_SERVER["REQUEST_URI"] == "/") {
header("Location: login.php");
else
} else {
header("Location: login.php?last_visited=" . base64_encode($_SERVER["REQUEST_URI"]) );
}
exit;
}