{% extends 'user/master.twig' %} {% from 'macros.twig' import container_title, pagination %} {% 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) }}

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.

{{ input_csrf('settings') }} {% if not settings_disable_account_options %} {% 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 darker purple so you don't accidentally force yourself to logout.

{{ input_csrf('settings') }}
{{ spagination }} {% for session in user_sessions %}
IP
{{ session.session_ip_decoded }} {% if session.session_country != 'XX' %}
{% endif %}
Created
Expires
{% if session.user_agent|length > 0 %}
User Agent
{{ session.user_agent }}
{% endif %}
{{ input_hidden('session', session.session_id) }} {{ input_csrf('settings') }}
{% 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 %}