Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions app/code/Magento/Customer/Controller/Account/LoginPost.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,31 +202,28 @@ public function execute()
'This account is not confirmed. <a href="%1">Click here</a> to resend confirmation email.',
$value
);
$this->messageManager->addError($message);
$this->session->setUsername($login['username']);
} catch (UserLockedException $e) {
$message = __(
'The account sign-in was incorrect or your account is disabled temporarily. '
. 'Please wait and try again later.'
);
$this->messageManager->addError($message);
$this->session->setUsername($login['username']);
} catch (AuthenticationException $e) {
$message = __(
'The account sign-in was incorrect or your account is disabled temporarily. '
. 'Please wait and try again later.'
);
$this->messageManager->addError($message);
$this->session->setUsername($login['username']);
} catch (LocalizedException $e) {
$message = $e->getMessage();
$this->messageManager->addError($message);
$this->session->setUsername($login['username']);
} catch (\Exception $e) {
// PA DSS violation: throwing or logging an exception here can disclose customer password
$this->messageManager->addError(
__('An unspecified error occurred. Please contact us for assistance.')
);
} finally {
if (isset($message)) {
$this->messageManager->addError($message);
$this->session->setUsername($login['username']);
}
}
} else {
$this->messageManager->addError(__('A login and a password are required.'));
Expand Down