Skip to content
Closed
Show file tree
Hide file tree
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
9 changes: 7 additions & 2 deletions app/code/Magento/Captcha/Model/ResourceModel/Log.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ protected function _construct()
*
* @param string|null $login
* @return $this
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function logAttempt($login)
{
Expand All @@ -78,7 +79,7 @@ public function logAttempt($login)
'count' => 1,
'updated_at' => $this->_coreDate->gmtDate()
],
['count' => new \Zend_Db_Expr('count+1'), 'updated_at']
['count' => 'count+1', 'updated_at']
);
}
$ip = $this->_remoteAddress->getRemoteAddress();
Expand All @@ -91,7 +92,7 @@ public function logAttempt($login)
'count' => 1,
'updated_at' => $this->_coreDate->gmtDate()
],
['count' => new \Zend_Db_Expr('count+1'), 'updated_at']
['count' => 'count+1', 'updated_at']
);
}
return $this;
Expand All @@ -102,6 +103,7 @@ public function logAttempt($login)
*
* @param string $login
* @return $this
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function deleteUserAttempts($login)
{
Expand All @@ -126,6 +128,7 @@ public function deleteUserAttempts($login)
* Get count attempts by ip
*
* @return null|int
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function countAttemptsByRemoteAddress()
{
Expand All @@ -152,6 +155,7 @@ public function countAttemptsByRemoteAddress()
*
* @param string $login
* @return null|int
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function countAttemptsByUserLogin($login)
{
Expand All @@ -176,6 +180,7 @@ public function countAttemptsByUserLogin($login)
* Delete attempts with expired in update_at time
*
* @return void
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function deleteOldAttempts()
{
Expand Down
Loading