Skip to content

Commit af7e0ca

Browse files
committed
Merge remote-tracking branch 'origin/MC-33699-CE-1' into 2.4-develop-php74-pr38
2 parents 6e9f548 + 3e29f3e commit af7e0ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/User/Observer/Backend/AuthObserver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ private function _updateLockingInformation($user)
174174
$updateLockExpires = false;
175175
$lockThreshInterval = new \DateInterval('PT' . $lockThreshold.'S');
176176
// set first failure date when this is first failure or last first failure expired
177-
if (1 === $failuresNum || !$firstFailureDate || (\time() - $firstFailureDate) > $lockThreshold) {
177+
if (1 === $failuresNum || !$firstFailureDate || ($now->getTimestamp() - $firstFailureDate) > $lockThreshold) {
178178
$newFirstFailureDate = $now;
179179
// otherwise lock user
180180
} elseif ($failuresNum >= $maxFailures) {

0 commit comments

Comments
 (0)