Unverified Commit 7c704346 authored by Jens Segers's avatar Jens Segers Committed by GitHub

Merge pull request #1903 from azizramdan/master

Fix Convert UTCDateTime to a date string when reset password
parents a8918aca 9a110783
......@@ -25,6 +25,23 @@ class DatabaseTokenRepository extends BaseDatabaseTokenRepository
* @inheritdoc
*/
protected function tokenExpired($createdAt)
{
$createdAt = $this->convertDateTime($createdAt);
return parent::tokenExpired($createdAt);
}
/**
* @inheritdoc
*/
protected function tokenRecentlyCreated($createdAt)
{
$createdAt = $this->convertDateTime($createdAt);
return parent::tokenRecentlyCreated($createdAt);
}
private function convertDateTime($createdAt)
{
// Convert UTCDateTime to a date string.
if ($createdAt instanceof UTCDateTime) {
......@@ -37,6 +54,6 @@ class DatabaseTokenRepository extends BaseDatabaseTokenRepository
$createdAt = $date->format('Y-m-d H:i:s');
}
return parent::tokenExpired($createdAt);
return $createdAt;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment