diff --git a/app/pages/security.php b/app/pages/security.php index 6ebf9ab..95f4a28 100644 --- a/app/pages/security.php +++ b/app/pages/security.php @@ -9,9 +9,9 @@ if (!($userObject->hasRight($user_id, 'superuser') || exit; } -if (!isset($currentUser)) { - include '../app/templates/error-unauthorized.php'; - exit; +if (!Session::getUsername()) { + header('Location: ' . htmlspecialchars($app_root) . '?page=login'); + exit(); } // Get current section diff --git a/app/templates/page-footer.php b/app/templates/page-footer.php index 3b126aa..9e7c076 100644 --- a/app/templates/page-footer.php +++ b/app/templates/page-footer.php @@ -12,7 +12,7 @@ - + diff --git a/app/templates/page-header.php b/app/templates/page-header.php index 1d09c26..b57da5c 100644 --- a/app/templates/page-header.php +++ b/app/templates/page-header.php @@ -10,7 +10,7 @@ - +