Skip to content

Commit b058663

Browse files
author
Cari Spruiell
committed
MAGETWO-37821: Wrong message is displayed after exceeding maximum login failures attempts
- reverted previous changes so that the same error message is always displayed
1 parent ea7b254 commit b058663

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

app/code/Magento/Backend/Model/Auth.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ public function login($username, $password)
175175
'backend_auth_user_login_failed',
176176
['user_name' => $username, 'exception' => $e]
177177
);
178-
self::throwException(__($e->getMessage()? : 'Please correct the user name or password.'));
178+
self::throwException(__('Please correct the user name or password.'));
179179
}
180180
}
181181

app/code/Magento/Backend/Test/Unit/Model/AuthTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ public function testLoginFailed()
5959
->method('create')
6060
->with('Magento\Backend\Model\Auth\Credential\StorageInterface')
6161
->will($this->returnValue($this->_credentialStorage));
62-
$exceptionMock =
63-
new \Magento\Framework\Exception\LocalizedException(__('Please correct the user name or password.'));
62+
$exceptionMock = new \Magento\Framework\Exception\LocalizedException(__('message'));
6463
$this->_credentialStorage
6564
->expects($this->once())
6665
->method('login')

0 commit comments

Comments
 (0)