103 $captchaModel = $this->helper->getCaptcha(self::FORM_ID);
104 if ($captchaModel->isRequired()) {
107 if (!$captchaModel->isCorrect(
108 $this->captchaStringResolver->resolve(
113 $customerId = $this->customerSession->getCustomerId();
114 $this->authentication->processAuthenticationFailure(
$customerId);
115 if ($this->authentication->isLocked(
$customerId)) {
116 $this->customerSession->logout();
117 $this->customerSession->start();
119 'The account is locked. Please wait and try again or contact %1.',
120 $this->scopeConfig->getValue(
'contact/email/recipient_email')
122 $this->messageManager->addError(
$message);
124 $this->messageManager->addError(
__(
'Incorrect CAPTCHA'));
125 $this->actionFlag->set(
'', \
Magento\Framework\
App\Action\Action::FLAG_NO_DISPATCH,
true);
126 $this->redirect->redirect(
$controller->getResponse(),
'*/*/edit');
130 $customer = $this->customerSession->getCustomer();
132 $captchaModel->logAttempt($login);
__construct(\Magento\Captcha\Helper\Data $helper, \Magento\Framework\App\ActionFlag $actionFlag, \Magento\Framework\Message\ManagerInterface $messageManager, \Magento\Framework\App\Response\RedirectInterface $redirect, CaptchaStringResolver $captchaStringResolver, AuthenticationInterface $authentication, Session $customerSession, ScopeConfigInterface $scopeConfig)
execute(Observer $observer)