{% extends 'global/master.twig' %}
{% set profileHidden = profile.permission(constant('Sakura\\Perms\\Site::DEACTIVATED')) or (profile.permission(constant('Sakura\\Perms\\Site::RESTRICTED')) and (user.id != profile.id and not user.permission(constant('Sakura\\Perms\\Manage::USE_MANAGE'), constant('Sakura\\Perms::MANAGE')))) %}
{% set noUserpage = profile.userPage|length < 1 %}
{% set profileView = noUserpage and profileView == 'index' ? 'comments' : profileView %}
{% block title %}{% if profileHidden %}User not found!{% else %}Profile of {{ profile.username }}{% endif %}{% endblock %}
{% block js %}
{% if not profileHidden %}
{% endif %}
{% endblock %}
{% block content %}
{% if profileHidden %}
The requested user does not exist!
There are a few possible reasons for this:
They changed their username.
They may have been restricted.
You made a typo.
They never existed.
{% else %}
{{ profile.username }}
{% if profile.isPremium %} {% endif %} {{ profile.title }}
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 %}
{% if not noUserpage %}
{% endif %}
{##}
{##}
{% if session.checkLogin %}
{% if user.id == profile.id %}
{% else %}
{% if user.isFriends(profile.id) != 0 %}{% endif %}
{% endif %}
{% if user.permission(constant('Sakura\\Perms\\Manage::CAN_RESTRICT_USERS'), constant('Sakura\\Perms::MANAGE')) %}
{% endif %}
{% endif %}
{% include 'profile/userpage.twig' %}
{% include 'profile/friends.twig' %}
{% include 'profile/groups.twig' %}
{% include 'profile/threads.twig' %}
{% include 'profile/posts.twig' %}
{% include 'profile/comments.twig' %}
Threads
{{ profile.forumStats.topics }}
Posts
{{ profile.forumStats.posts }}
Friends
{{ profile.friends(2)|length }}
{% if profile.profileFields or user.permission(constant('Sakura\\Perms\\Manage::USE_MANAGE'), constant('Sakura\\Perms::MANAGE')) %}
{% if session.checkLogin %}
{% else %}
Log in to view the full profile!
{% endif %}
{% endif %}
Account Standing
{% if profile.permission(constant('Sakura\\Perms\\Site::DEACTIVATED')) %}