Skip to content

Commit 3e29f3e

Browse files
committed
MC-33699: Stabilize MFTF tests
1 parent 0446ec9 commit 3e29f3e

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)