This commit is contained in:
Antonio Ramirez
2018-02-13 15:20:16 +01:00
committed by GitHub
parent aee56e6b37
commit 7748dc2b3a

View File

@ -344,7 +344,7 @@ class User extends ActiveRecord implements IdentityInterface
if (is_null($this->password_changed_at)) { if (is_null($this->password_changed_at)) {
return $this->getModule()->maxPasswordAge; return $this->getModule()->maxPasswordAge;
} }
$d = new \DateTime($this->password_changed_at); $d = new \DateTime("@{$this->password_changed_at}");
return $d->diff(new \DateTime(), true)->format("%a"); return $d->diff(new \DateTime(), true)->format("%a");
} }
} }