{% macro user_card(user) %} {% from 'macros.twig' import avatar %} {% if user.info is defined %} {% set colour = user.colour %} {% set info = user.info %} {% set ftopics = user.ftopics %} {% set fposts = user.fposts %} {% else %} {% set colour = user.user_colour %} {% set info = { 'id': user.user_id, 'name': user.username, 'title': user.user_title|default(''), 'countryCode': user.user_country|default('XX'), 'lastActiveTime': user.user_active, 'createdTime': user.user_created } %} {% set ftopics = user.user_count_topics %} {% set fposts = user.user_count_posts %} {% endif %}
{{ avatar(info.id, 50, info.name) }}
{{ info.name }}
{% if info.title is not empty %}
{{ info.title }}
{% endif %} {% if info.countryCode != 'XX' %}
{{ info.countryCode|country_name }}
{% endif %}
{% if ftopics > 0 %}
Topics
{{ ftopics|number_format }}
{% endif %} {% if fposts > 0 %}
Posts
{{ fposts|number_format }}
{% endif %} {% if info.lastActiveTime is not null %}
Last seen
{% endif %}
Joined
{% endmacro %} {% macro user_session(session, is_current_session) %} {% from '_layout/input.twig' import input_hidden, input_csrf, input_checkbox_raw %}
{{ session.countryCode }}
{{ session.clientInfo }}
{{ input_csrf() }} {{ input_hidden('session', session.id) }}
Created from IP
{{ session.firstRemoteAddress }}
{% if session.lastRemoteAddress is not null %}
Last used from IP
{{ session.lastRemoteAddress }}
{% endif %}
Created
Expires{% if not session.shouldBumpExpires %} (static){% endif %}
{% if session.lastActiveTime is not null %}
Last Active
{% endif %}
User Agent
{{ session.userAgentString }}
{% endmacro %} {% macro user_login_attempt(attempt) %}
{% endmacro %} {% macro user_account_log(data, users, colours) %} {% from 'macros.twig' import avatar %}
{% if data.userId is not null and users[data.userId] is defined %} {% set user = users[data.userId] %} {% set colour = colours[data.userId]|default(null) %} {% endif %}
{% endmacro %}