{% from 'user/profile_macros.twig' import profile_image_changer %}
{% if (user.id == profile.id and not user.restricted and user.activated and user.perms.changeHeader) or user.perms.manageProfileImages %} {{ profile_image_changer(route('user.header', profile.id), '.profile__header') }} {% endif %}
{% if (user.id == profile.id and not user.restricted and user.activated and user.perms.changeAvatar) or user.perms.manageProfileImages %} {{ profile_image_changer(route('user.avatar', profile.id), '.avatar') }} {% endif %}

{{ profile.username }}

{% if profile.isPremium %}Tenshi {% endif %}{{ profile.country }} {{ profile.title }}
{% spaceless %}
Joined 
{% if profile.lastOnline < 1 %} {{ profile.username }} hasn't logged in yet. {% else %} Last online  {% endif %}
{% if profile.birthday != '0000-00-00' and profile.birthday|split('-')[0] > 0 %}
Age {{ profile.birthday(true) }} years old
{% endif %} {% endspaceless %}
{% for name, data in sections %} {% if data.display %} {% endif %} {% endfor %}
{% if user.isActive %}
{% if user.id == profile.id %} {% else %} {% if user.isFriends(profile.id) != 0 %}{% endif %} {% endif %} {% if user.perms.canRestrict %} {% endif %}
{% endif %}