From f8f488f7a2f458b55410957bc81b46cc1e6860f6 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Fri, 20 Sep 2024 22:53:40 +0200 Subject: [PATCH] apply selected admin language and profile --- .../Controller/Admin/d3_totp_LoginController.php | 6 +++--- Modules/Core/totpSystemEventHandler.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Modules/Application/Controller/Admin/d3_totp_LoginController.php b/Modules/Application/Controller/Admin/d3_totp_LoginController.php index cea75c8..8ddf03c 100644 --- a/Modules/Application/Controller/Admin/d3_totp_LoginController.php +++ b/Modules/Application/Controller/Admin/d3_totp_LoginController.php @@ -87,10 +87,10 @@ class d3_totp_LoginController extends d3_totp_LoginController_parent $this->d3TotpGetSession()->deleteVariable(d3totp_conf::SESSION_ADMIN_CHLANGUAGE); } - public function d3totpAfterLoginSetLanguage() + public function d3totpAfterLoginSetLanguage(): void { $myUtilsServer = $this->d3TotpGetUtilsServer(); - $iLang = $this->d3TotpGetSession()->getVariable(d3totp_conf::SESSION_ADMIN_CHLANGUAGE); + $iLang = Registry::getRequest()->getRequestEscapedParameter('chlanguage'); $aLanguages = $this->d3TotpGetLangObject()->getAdminTplLanguageArray(); if (!isset($aLanguages[$iLang])) { @@ -105,7 +105,7 @@ class d3_totp_LoginController extends d3_totp_LoginController_parent * @param d3totp $totp * @return bool */ - public function d3TotpLoginMissing($totp) + public function d3TotpLoginMissing(d3totp $totp): bool { return $totp->isActive() && false == $this->d3TotpGetSession()->getVariable(d3totp_conf::SESSION_ADMIN_AUTH); diff --git a/Modules/Core/totpSystemEventHandler.php b/Modules/Core/totpSystemEventHandler.php index ecc8e25..b6d877a 100644 --- a/Modules/Core/totpSystemEventHandler.php +++ b/Modules/Core/totpSystemEventHandler.php @@ -51,8 +51,8 @@ class totpSystemEventHandler extends totpSystemEventHandler_parent $this->getUtilsObject()->redirect( 'index.php?cl=d3totpadminlogin&'. 'stoken='.Registry::getRequest()->getRequestEscapedParameter('stoken').'&'. - 'profile='.$this->d3TotpGetSession()->getVariable(d3totp_conf::SESSION_ADMIN_PROFILE).'&'. - 'chlanguage='.$this->d3TotpGetSession()->getVariable(d3totp_conf::SESSION_ADMIN_CHLANGUAGE), + 'profile='.Registry::getRequest()->getRequestEscapedParameter('profile').'&'. + 'chlanguage='.Registry::getRequest()->getRequestEscapedParameter('chlanguage'), false ); }