{% extends "base.html" %} {% block title %}User Details - {{ user.username }} - Admin - AutoModerate{% endblock %} {% block content %}

User Details - {{ user.username }}

User Information
Username
{{ user.username }} {% if user.id == current_user.id %} You {% endif %}
Email
{{ user.email }}
Status
{% if user.is_active %} Active {% else %} Inactive {% endif %}
Role
{% if user.is_admin %} Admin {% else %} User {% endif %}
Created
{{ user.created_at.strftime('%Y-%m-%d %H:%M') }}
Last Updated
{{ user.updated_at.strftime('%Y-%m-%d %H:%M') }}
{% if user.id != current_user.id %}

Danger Zone

Delete User Account
This action cannot be undone. This will permanently delete the user account and all associated data.

{% if projects %}
Warning: This user has {{ projects|length }} project(s). All projects must be deleted before the user can be deleted.
{% endif %}
{% endif %}
User Statistics

{{ projects|length }}

Total Projects

{{ total_content }}

Total Content

{{ total_rules }}

Total Rules

{{ total_api_keys }}

API Keys
User Projects
{% if projects %}
{% for project_data in projects %} {% endfor %}
Project Name Description Content Count Rules Count API Keys Created Actions
{{ project_data.project.name }}
{{ project_data.project.description or 'No description' }}
{{ project_data.content_count }} {{ project_data.rules_count }} {{ project_data.api_keys_count }} {{ project_data.project.created_at.strftime('%Y-%m-%d') }}
{% else %}
No Projects

This user hasn't created any projects yet.

{% endif %}
{% endblock %}