Skip to content

Commit 6664f70

Browse files
authored
Expiration period is now hours instead of days
1 parent fd4a70e commit 6664f70

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

app/code/Magento/Customer/Model/Customer.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,6 +1286,8 @@ public function changeResetPasswordLinkToken($passwordLinkToken)
12861286
* Check if current reset password link token is expired
12871287
*
12881288
* @return boolean
1289+
* @deprecated
1290+
* @see \Magento\Customer\Model\AccountManagement::isResetPasswordLinkTokenExpired
12891291
*/
12901292
public function isResetPasswordLinkTokenExpired()
12911293
{
@@ -1304,12 +1306,9 @@ public function isResetPasswordLinkTokenExpired()
13041306
return true;
13051307
}
13061308

1307-
$dayDifference = floor(($currentTimestamp - $tokenTimestamp) / (24 * 60 * 60));
1308-
if ($dayDifference >= $expirationPeriod) {
1309-
return true;
1310-
}
1311-
1312-
return false;
1309+
$hourDifference = floor(($currentTimestamp - $tokenTimestamp) / (60 * 60));
1310+
1311+
return $hourDifference >= $expirationPeriod;
13131312
}
13141313

13151314
/**

0 commit comments

Comments
 (0)