N°3985 - Performance checks on the back end - Fix Session helper

This commit is contained in:
Eric
2021-08-26 16:14:14 +02:00
parent 81d9ea389d
commit 67cd5e321e
7 changed files with 7 additions and 22 deletions

View File

@@ -51,10 +51,8 @@ class LoginForm extends AbstractLoginFSMExtension implements iLoginUIExtension
$this->bForceFormOnError = false;
exit;
}
Session::Start();
Session::Set('login_temp_auth_user', $sAuthUser);
Session::Set('login_mode', 'form');
Session::WriteClose();
}
return LoginWebPage::LOGIN_FSM_CONTINUE;
}

View File

@@ -394,14 +394,12 @@ class LoginWebPage extends NiceWebPage
public static function ResetSession()
{
// Unset all of the session variables.
Session::Start();
Session::Unset('auth_user');
Session::Unset('login_state');
Session::Unset('can_logoff');
Session::Unset('archive_mode');
Session::Unset('impersonate_user');
UserRights::_ResetSessionCache();
Session::WriteClose();
// If it's desired to kill the session, also delete the session cookie.
// Note: This will destroy the session, and not just the session data!
}
@@ -669,10 +667,8 @@ class LoginWebPage extends NiceWebPage
$oLog->DBInsertNoReload();
}
Session::Start();
Session::Set('auth_user', $sAuthUser);
Session::Set('login_mode', $sLoginMode);
Session::WriteClose();
UserRights::_InitSessionCache();
}
@@ -1017,7 +1013,6 @@ class LoginWebPage extends NiceWebPage
$sMessage = self::HandleOperations($operation); // May exit directly
$iRet = self::Login($iOnExit);
if ($iRet == self::EXIT_CODE_OK)
{
if ($bMustBeAdmin && !UserRights::IsAdministrator())

View File

@@ -68,9 +68,10 @@ register_shutdown_function(function()
}
}
});
$oKPI = new ExecutionKPI();
Session::Start();
Session::WriteClose();
$oKPI->ComputeAndReport("Session Start");
$sSwitchEnv = utils::ReadParam('switch_env', null);
$bAllowCache = true;