{% extends 'user/master.twig' %} {% from 'macros.twig' import container_title, pagination %} {% from 'user/macros.twig' import user_session %} {% from '_layout/input.twig' import input_hidden, input_csrf, input_text %} {% set title = 'Settings' %} {% block content %} {% if settings_errors is defined and settings_errors|length > 0 %}
{% for error in settings_errors %} {{ error }} {% endfor %}
{% else %}
A few of the elements on this page have been moved to the on-profile editor. To find them, go to your profile and hit the "Edit Profile" button below your avatar.
{% endif %}
{{ container_title(' Account', '', true) }} {{ input_csrf('settings') }}

Here you can change your e-mail address and/or your password, please make sure your e-mail is accurate and your password is strong in order to protect your account. For convenience your current e-mail address is displayed. You are required to verify yourself by entering your current password to change either value.

{% if settings_disable_account_options %}
E-mail and password changing is only available on the main site for stability reasons.
{% else %}
{% endif %}
{{ container_title(' Sessions', '', true) }} {% set spagination = pagination(sessions_count, sessions_take, sessions_offset, '?m=sessions') %}

These are the active logins to your account, clicking the Kill button will force a logout on that session. Your current login is highlighted with a different colour so you don't accidentally force yourself to logout.

{{ input_csrf('settings') }} {{ input_hidden('session', 'all') }}
{{ spagination }}
{% for session in user_sessions %} {{ user_session(session, session.session_id == active_session_id) }} {% endfor %}
{{ spagination }}
{{ container_title(' Login History', '', true) }} {% set lhpagination = pagination( login_attempts_count, login_attempts_take, login_attempts_offset, '?m=logs'|url_construct({'ao': audit_log_offset}), false, 'lo' ) %}

These are all the login attempts to your account. If any attempt that you don't recognise is marked as successful your account may be compromised, ask a staff member for advice in this case.

{{ lhpagination }} {% for attempt in user_login_attempts %} {% endfor %} {{ lhpagination }}
{{ container_title(' Account Log', '', true) }} {% set alpagination = pagination( audit_log_count, audit_log_take, audit_log_offset, '?m=logs'|url_construct({'lo': login_attempts_offset}), false, 'ao' ) %}

This is a log of all "important" actions that have been done using your account for your review. If you notice anything strange, please alert the staff.

{{ alpagination }} {% for log in audit_logs %}
Date
Action
{% if log.log_action in log_strings|keys %} {{ log_strings[log.log_action]|vsprintf(log.log_params|json_decode) }} {% else %} {{ log.log_action }}({{ log.log_params }}) {% endif %}
{% endfor %} {{ alpagination }}
{% endblock %}