{% macro user_card(user, profile_url, rank_url, actions) %}
{{ user.username }}
{# put something interesting here, the very first version had a lot of stats
#}
{% if actions is iterable and actions|length > 0 %}
{% for action in actions %} {% if action.display is not defined or action.display %} {% endif %} {% endfor %}
{% 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('settings') }} {{ input_hidden('session[]', session.session_id) }}
IP Address
{{ session.session_ip }}
Created
Expires
{% 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 %}