{% macro user_card(user) %}
{{ user.username }}
{% if user.user_title is defined and user.user_title is not empty %}
{{ user.user_title }}
{% endif %} {% if user.user_country|default('XX') != 'XX' %}
{{ user.user_country|country_name }}
{% endif %}
{% if user.user_count_following|default(0) > 0 %}
Following
{{ user.user_count_following|number_format }}
{% endif %} {% if user.user_count_followers|default(0) > 0 %}
Followers
{{ user.user_count_followers|number_format }}
{% endif %} {% if user.user_count_topics|default(0) > 0 %}
Topics
{{ user.user_count_topics|number_format }}
{% endif %} {% if user.user_count_posts|default(0) > 0 %}
Posts
{{ user.user_count_posts|number_format }}
{% endif %}
{% if user.user_created is defined %}
Joined
{% endif %} {% if user.user_active is defined %} {% if user.user_active is null %}
Never logged in
{% else %}
Last seen
{% endif %} {% endif %}
{% if user.current_user_id|default(0) != 0 and user.current_user_id != user.user_id %} {% set is_following = user.user_is_following|default(false) %} {% endif %}
{% endmacro %} {% macro user_session(session, is_current_session) %} {% from '_layout/input.twig' import input_hidden, input_csrf, input_checkbox_raw %} {% set browser = get_browser(session.session_user_agent) %}
{{ session.session_country }}
{{ browser.browser }} on {{ browser.platform }}
{{ input_csrf('user_session') }} {{ input_hidden('session[]', session.session_id) }}
Created from IP
{{ session.session_ip }}
{% if session.session_ip_last is not null %}
Last used from IP
{{ session.session_ip_last }}
{% endif %}
Created
Expires{% if not session.session_expires_bump %} (static){% endif %}
{% if session.session_active is not null %}
Last Active
{% endif %}
User Agent
{{ session.session_user_agent|length > 0 ? session.session_user_agent : 'None' }}
{% endmacro %} {% macro user_login_attempt(attempt) %} {% set browser = get_browser(attempt.attempt_user_agent) %}
{% endmacro %} {% macro user_account_log(data, strings) %}
{% if data.user_id is defined %} {% endif %}
{% endmacro %} {% macro user_profile_warning(warning, show_private_note, show_user_info, delete_csrf) %} {% if warning.warning_type == constant('MSZ_WARN_SILENCE') %} {% set warning_text = 'Silence' %} {% set warning_class = 'silence' %} {% elseif warning.warning_type == constant('MSZ_WARN_BAN') %} {% set warning_text = 'Ban' %} {% set warning_class = 'ban' %} {% elseif warning.warning_type == constant('MSZ_WARN_WARNING') %} {% set warning_text = 'Warning' %} {% set warning_class = 'warning' %} {% else %} {% set warning_text = 'Note' %} {% set warning_class = 'note' %} {% endif %}
{% if show_user_info or delete_csrf %}
{% if show_user_info %} {% if warning.username is defined or warning.user_ip is defined %}
{% if warning.username is defined %}
{{ warning.username }}
{% endif %} {% if warning.user_ip is defined %}
{{ warning.user_ip }}
{% endif %}
{% endif %}
{{ warning.issuer_username }}
{{ warning.issuer_ip }}
{% endif %} {% if delete_csrf %} {% endif %}
{% endif %}
{{ warning_text }}
{% if warning_has_duration(warning.warning_type) %} {% else %}
{% endif %}
{{ warning.warning_note }} {% if show_private_note and warning.warning_note_private|length > 0 %}
{{ warning.warning_note_private|nl2br }}
{% endif %}
{% endmacro %}