{% extends "users/_edit/layout" %} {% import "_includes/forms" as forms %} {% set pageTitle = "Administration"|t %} {% if not user.admin %} {% exit 404 %} {% endif %} {% if account is not defined %} {% if blx.request.segment(1) == 'myaccount' %} {% set account = user %} {% elseif userId %} {% set account = blx.users.id(userId).first %} {% endif %} {% if not account %}{% exit 404 %}{% endif %} {% endif %} {% set content %}

Groups and Permissions

{{ forms.checkbox({ label: '' ~ "Admin"|t ~ '', name: 'admin', checked: account.admin }) }}
{% set userGroups = account.groups %} {% for group in blx.userGroups.getAllGroups %}
{{ forms.checkbox({ label: group.name, name: 'groups[]', value: group.id, checked: (group.id in userGroups|keys) }) }}
{% endfor %}

User Info

{% if account.status == 'locked' and blx.config.cooldownDuration %} {% endif %} {% if account.status != 'pending' %} {% endif %}
{{ "Account Status"|t }} {% if account.status == 'pending' %}
{{ "Unverified"|t }}  {% elseif account.status == 'locked' %}
{{ "Locked"|t }}  {% elseif account.status == 'suspended' %}
{{ "Suspended"|t }}  {% else %}
{{ "Active"|t }} {% endif %}
{{ "Cooldown Time Remaining"|t }} {% set timeRemaining = account.remainingCooldownTime.humanDuration %}
{{ "Registration Date" }} {{ account.dateCreated.nice }}
{{ "Last Login Date"|t }} {% if account.lastLoginDate %}{{ account.lastLoginDate.nice }}{% else %}{{ "Never"|t }}{% endif %}
{{ "Last Invalid Login Date"|t }} {% if account.lastInvalidLoginDate %}{{ account.lastInvalidLoginDate.nice }}{% else %}{{ "Never"|t }}{% endif %}
{{ "Last Password Change Date"|t }} {% if account.lastPasswordChangeDate %}{{ account.lastPasswordChangeDate.nice }}{% else %}{{ "Never"|t }}{% endif %}
{{ "Invalid Login Count"|t }} {% if account.invalidLoginCount %}{{ account.invalidLoginCount }}{% else %}0{% endif %}

{% if true or not account.isCurrent %} {% if account.status != 'suspended' %} {% endif %} {% endif %}
{% endset %}