diff --git a/src/Users/profile.php b/src/Users/profile.php index 38875118..9aa99667 100644 --- a/src/Users/profile.php +++ b/src/Users/profile.php @@ -206,6 +206,7 @@ function user_profile_get(int $userId): array { u.`user_about_parser`, u.`user_about_content`, u.`user_signature_parser`, u.`user_signature_content`, %1$s, + TIMESTAMPDIFF(YEAR, IF(u.`user_birthdate` < \'0001-01-01\', NULL, u.`user_birthdate`), NOW()) AS `user_age`, COALESCE(u.`user_title`, r.`role_title`) AS `user_title`, COALESCE(u.`user_colour`, r.`role_colour`) AS `user_colour`, `user_background_settings` & 0x0F AS `user_background_attachment`, diff --git a/templates/profile/_layout/header.twig b/templates/profile/_layout/header.twig index a3b6d6e1..07137522 100644 --- a/templates/profile/_layout/header.twig +++ b/templates/profile/_layout/header.twig @@ -42,7 +42,7 @@
- {{ profile.user_country|country_name }} + {{ profile.user_country|country_name }}{% if profile.user_age > 0 %}, {{ profile.user_age }} year{{ profile.user_age != 's' ? 's' : '' }} old{% endif %}
{% else %}