mirror of
https://github.com/openvk/openvk
synced 2025-04-19 14:43:01 +03:00
parent
bed2c9748b
commit
0fd8734ea1
1 changed files with 1 additions and 4 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue