Skip to content

Commit 583c88a

Browse files
MC-5602: CAPTCHA doesn't appear in login popup after refreshing page.
- fix login issue with correct user credentials
1 parent d483e88 commit 583c88a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/code/Magento/Captcha/Model/Customer/Plugin/AjaxLogin.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,14 @@ public function aroundExecute(
9898
foreach ($this->formIds as $formId) {
9999
if ($formId === $loginFormId) {
100100
$captchaModel = $this->helper->getCaptcha($formId);
101-
$captchaModel->logAttempt($username);
102101
if ($captchaModel->isRequired($username)) {
103102
if (!$captchaModel->isCorrect($captchaString)) {
104103
$this->sessionManager->setUsername($username);
104+
$captchaModel->logAttempt($username);
105105
return $this->returnJsonError(__('Incorrect CAPTCHA'));
106106
}
107107
}
108+
$captchaModel->logAttempt($username);
108109
}
109110
}
110111
return $proceed();

0 commit comments

Comments
 (0)