I know I can get a user object like this:
There is no age property or date of birth.
So I can get a profile object like this:
And that profile object has date of birth day, month, and year properties.
I know I can calculate in PHP the age but I think there is a way to do it within the XF 2 framework as a property or method. Does anyone know?
PHP:
$finder = \XF::finder('XF:User');
$user = $finder->where('username', "Joe")->fetchOne();
So I can get a profile object like this:
PHP:
$profile = $user->Profile;
And that profile object has date of birth day, month, and year properties.
I know I can calculate in PHP the age but I think there is a way to do it within the XF 2 framework as a property or method. Does anyone know?