Refactor: Simplify login redirection logic and clean up UI test code

This commit is contained in:
Jokob @NetAlertX
2026-02-22 05:20:05 +00:00
parent 39f617be5f
commit 25a81556e3
2 changed files with 4 additions and 12 deletions

View File

@@ -83,7 +83,7 @@ if ($nax_WebProtection == 'true') {
$isLoggedIn = isset($_SESSION['login']) && $_SESSION['login'] == 1;
// Determine if the user should be redirected
if ($isLoggedIn || $isLogonPage || (isset($_COOKIE[COOKIE_SAVE_LOGIN_NAME]) && $nax_Password === $_COOKIE[COOKIE_SAVE_LOGIN_NAME])) {
if ($isLoggedIn || $isLogonPage) {
// Logged in or stay on this page if we are on the index.php already
} else {
// We need to redirect