transfer profile and language selection through webauthn process
Dieser Commit ist enthalten in:
Ursprung
26556eb889
Commit
9e0b92c9a9
@ -75,6 +75,10 @@ class d3webauthnadminlogin extends AdminController
|
||||
$this->generateCredentialRequest();
|
||||
|
||||
$this->addTplParam('navFormParams', $this->d3GetSession()->getVariable(WebauthnConf::WEBAUTHN_SESSION_NAVFORMPARAMS));
|
||||
$this->addTplParam('currentProfile', $this->d3GetSession()->getVariable(WebauthnConf::WEBAUTHN_ADMIN_PROFILE));
|
||||
$this->d3GetSession()->deleteVariable(WebauthnConf::WEBAUTHN_ADMIN_PROFILE);
|
||||
$this->addTplParam('currentChLanguage', $this->d3GetSession()->getVariable(WebauthnConf::WEBAUTHN_ADMIN_CHLANGUAGE));
|
||||
$this->d3GetSession()->deleteVariable(WebauthnConf::WEBAUTHN_ADMIN_CHLANGUAGE);
|
||||
|
||||
return $this->d3CallMockableParent('render');
|
||||
}
|
||||
@ -114,7 +118,7 @@ class d3webauthnadminlogin extends AdminController
|
||||
/** @var d3_User_Webauthn $user */
|
||||
$user = $this->d3GetUserObject();
|
||||
$userId = $this->d3GetSession()->getVariable(WebauthnConf::WEBAUTHN_ADMIN_SESSION_CURRENTUSER);
|
||||
$selectedProfile = $this->d3GetSession()->getVariable(WebauthnConf::WEBAUTHN_ADMIN_PROFILE);
|
||||
$selectedProfile = Registry::getRequest()->getRequestEscapedParameter('profile');
|
||||
|
||||
try {
|
||||
$error = Registry::getRequest()->getRequestEscapedParameter('error');
|
||||
@ -132,12 +136,9 @@ class d3webauthnadminlogin extends AdminController
|
||||
$user->load($userId);
|
||||
$session = $this->d3GetSession();
|
||||
$adminProfiles = $session->getVariable("aAdminProfiles");
|
||||
$selectedLanguage = $session->getVariable(WebauthnConf::WEBAUTHN_ADMIN_CHLANGUAGE);
|
||||
$session->initNewSession();
|
||||
$session->setVariable("aAdminProfiles", $adminProfiles);
|
||||
$session->setVariable(WebauthnConf::OXID_ADMIN_AUTH, $userId);
|
||||
$session->setVariable(WebauthnConf::WEBAUTHN_ADMIN_PROFILE, $selectedProfile);
|
||||
$session->setVariable(WebauthnConf::WEBAUTHN_ADMIN_CHLANGUAGE, $selectedLanguage);
|
||||
|
||||
$cookie = Registry::getUtilsServer()->getOxCookie();
|
||||
if ($cookie === null) {
|
||||
|
@ -23,6 +23,8 @@
|
||||
|
||||
<input type="hidden" name="fnc" value="">
|
||||
<input type="hidden" name="cl" value="login">
|
||||
<input type="hidden" name="profile" value="[{$currentProfile}]">
|
||||
<input type="hidden" name="chlanguage" value="[{$currentChLanguage}]">
|
||||
|
||||
[{if !empty($Errors.default)}]
|
||||
[{include file="inc_error.tpl" Errorlist=$Errors.default}]
|
||||
|
@ -93,7 +93,7 @@ class d3_LoginController_Webauthn extends d3_LoginController_Webauthn_parent
|
||||
public function d3webauthnAfterLogin()
|
||||
{
|
||||
$myUtilsServer = Registry::getUtilsServer();
|
||||
$sProfile = Registry::getSession()->getVariable(WebauthnConf::WEBAUTHN_ADMIN_PROFILE);
|
||||
$sProfile = Registry::getRequest()->getRequestEscapedParameter('profile');
|
||||
|
||||
// #533
|
||||
if (isset($sProfile)) {
|
||||
@ -110,7 +110,7 @@ class d3_LoginController_Webauthn extends d3_LoginController_Webauthn_parent
|
||||
}
|
||||
|
||||
// languages
|
||||
$iLang = Registry::getSession()->getVariable(WebauthnConf::WEBAUTHN_ADMIN_CHLANGUAGE);
|
||||
$iLang = Registry::getRequest()->getRequestEscapedParameter('chlanguage');
|
||||
|
||||
$aLanguages = Registry::getLang()->getAdminTplLanguageArray();
|
||||
if (!isset($aLanguages[$iLang])) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren