Implement superadmin login redirection and session handling improvements

This commit introduces a new function, `fxSuperadmRedirectToLoginIfNeeded`, to streamline the login redirection process for superadmin users. It enhances session management by checking for user authentication and allowing legacy account access under specific conditions. Additionally, the login flow is updated to ensure users are redirected appropriately after login, improving the overall security and user experience in the superadmin interface. These changes aim to enhance maintainability and clarity in session handling across various superadmin pages.
This commit is contained in:
2026-07-07 14:15:48 -04:00
parent 20ab5a8f08
commit c7482016ce
14 changed files with 408 additions and 4 deletions

View File

@ -10,6 +10,10 @@ require_once('inc_fonctions.php');
require_once('inc_fx_messages.php');
require_once('inc_fx_static_sync.php');
if (empty($_SESSION['usa_id'])) {
fxAdminRequireSuperadmLogin();
}
if (!fxAdminStaticSyncAllowed()) {
header('HTTP/1.1 403 Forbidden');
echo 'Accès refusé.';