apply selected admin language and profile

This commit is contained in:
Daniel Seifert 2024-09-20 22:53:40 +02:00
parent bef6651a3f
commit f8f488f7a2
Signed by: DanielS
GPG Key ID: 6A513E13AEE66170
2 changed files with 5 additions and 5 deletions

View File

@ -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);

View File

@ -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
);
}