Revert "fix(age): calculation"

This reverts commit 2abf4f0bd6.
This commit is contained in:
veselcraft 2025-03-16 17:45:19 +03:00
parent bed2c9748b
commit 0fd8734ea1
No known key found for this signature in database
GPG key ID: 9CF0B42766CCF7BA

View file

@ -524,10 +524,7 @@ class User extends RowModel
public function getAge(): ?int public function getAge(): ?int
{ {
$birthday = new \DateTime(); return (int) floor((time() - $this->getBirthday()->timestamp()) / YEAR);
$birthday->setTimestamp($this->getBirthday()->timestamp());
$today = new \DateTime();
return (int) $today->diff($birthday)->y;
} }
public function get2faSecret(): ?string public function get2faSecret(): ?string