Skip to content

Commit

Permalink
fix: persistent login error
Browse files Browse the repository at this point in the history
  • Loading branch information
hschoenenberger committed Feb 6, 2023
1 parent bdcd330 commit 5e46fb8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
2 changes: 1 addition & 1 deletion controllers/admin/AdminLoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public function createPsAccountsLoginTemplate()
$isoCode = $this->context->currentLocale->getCode();

$this->context->smarty->assign('uriHelpCenter', $this->getUriHelpCenter($isoCode));
$this->context->smarty->assign('loginError', $session->get('loginError'));
$this->context->smarty->assign('loginError', $session->remove('loginError'));
$this->context->smarty->assign('meta_title', '');
$this->context->smarty->assign('ssoResendVerificationEmail',
$this->psAccountsModule->getParameter('ps_accounts.sso_resend_verification_email_url')
Expand Down
10 changes: 0 additions & 10 deletions controllers/admin/AdminOAuth2PsAccountsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,6 @@ private function initUserSession(PrestaShopUser $user): bool

$cookie->write();

$this->unsetLoginError();

if ($this->module->isShopEdition()) {
$this->analyticsService->identify(
$user->getId(),
Expand Down Expand Up @@ -270,12 +268,4 @@ private function setLoginError(string $error): void
{
$this->getSession()->set('loginError', $error);
}

/**
* @throws ContainerNotFoundException
*/
private function unsetLoginError(): void
{
$this->getSession()->remove('loginError');
}
}

0 comments on commit 5e46fb8

Please sign in to comment.