{% if (expiring_users and expiring_users|length > 0) or (expired_users and expired_users|length > 0) %}
{% if expiring_users and expiring_users|length > 0 %}

Expiring This Week

Users whose access will expire within 7 days

{{ expiring_users|length }}
users
{% for item in expiring_users %}
{% if item.user.identity and item.user.identity.primary_username %} {{ item.user.identity.primary_username[0]|upper }} {% else %} {{ item.user.username[0]|upper }} {% endif %}
{% if item.user.identity and item.user.identity.primary_username %} {{ item.user.identity.primary_username }} {% else %} {{ item.user.username }} {% endif %}
Expires {{ item.user.expires.strftime("%Y-%m-%d %H:%M") if item.user.expires else 'Never' }}
{% if item.user.server %} {% endif %} {{ item.days_left|int }} day {% if item.days_left != 1 %}s{% endif %}
{% endfor %}
{{ expiring_users|length }} user {% if expiring_users|length != 1 %}s{% endif %} expiring within the next week {% if expiring_users|length > 5 %}- scroll to view all{% endif %}
{% endif %} {% if expired_users and expired_users|length > 0 %}
🗑️

Recently Expired Users

Users whose access has expired and been deleted

{{ expired_users|length }}
users
{% for user in expired_users %}
{{ user.username[0]|upper if user.username else '?' }}
{{ user.username or 'Unknown' }}
Expired {{ user.expired_at.strftime("%Y-%m-%d %H:%M") if user.expired_at else 'Unknown' }}
{% if user.server %} {% endif %} Expired
{% endfor %}
{{ expired_users|length }} expired user {% if expired_users|length != 1 %}s{% endif %} {% if expired_users|length > 5 %}- scroll to view all{% endif %}
{% endif %}
{% endif %}
Loading...
📚

All Expired Users

Complete history of users whose access has expired and been deleted

Loading expired users history...