{% extends "base.html" %} {% block title %}{{ target_user.display_name or target_user.email or target_user.user_id[:12] }} — Users{% endblock %} {% block page_title %}Users{% endblock %} {% block content %}

{{ target_user.display_name or target_user.email or target_user.user_id }}

{{ target_user.user_id }}

{% if not target_user.is_active %} DEACTIVATED {% endif %}

{{ counts.completed }}/{{ counts.attempted }}

Challenges

{{ counts.badges }}

Badges

{{ counts.sessions }}

Sessions

{{ counts.events }}

Events

{{ counts.chats }}

Messages

{{ target_user.namespace }}

Namespace

Identity

Email{{ target_user.email or '-' }}
Display Name{{ target_user.display_name or '-' }}
Created{{ target_user.created_at.strftime('%b %d, %Y %H:%M') if target_user.created_at else '-' }}
Last Login{{ target_user.last_login.strftime('%b %d, %Y %H:%M') if target_user.last_login else '-' }}
Active{{ 'Yes' if target_user.is_active else 'No' }}

Profile

{% if profile %}
Username{{ profile.username or '-' }}
Bio{{ profile.bio or '-' }}
Avatar{{ profile.avatar_emoji }} ({{ profile.avatar_type or 'emoji' }})
Public{{ 'Yes' if profile.is_public else 'No' }}
Activity Feed{{ 'On' if profile.show_activity else 'Off' }}
{% else %}

No profile created

{% endif %}
{% if sessions %}

Sessions ({{ sessions | length }})

{% for s in sessions %} {% endfor %}
Session ID Type Last Accessed Expires IP
{{ s.session_id[:16] }}... {% if s.is_temporary %} temp {% else %} perm {% endif %} {{ s.last_accessed.strftime('%b %d, %H:%M') if s.last_accessed else '-' }} {{ s.expires_at.strftime('%b %d, %H:%M') if s.expires_at else '-' }} {{ s.current_ip or s.original_ip or '-' }}
{% endif %} {% if progress %}

Challenge Progress ({{ progress | length }})

{% for p in progress %} {% set status_colors = {"completed": "text-green", "in_progress": "text-cyan", "available": "text-text-2", "locked": "text-text-3"} %} {% endfor %}
Challenge Status Attempts Hints Completed
{{ p.challenge_id }} {{ p.status }} {{ p.attempts }} {{ p.hints_used }} {{ p.completed_at.strftime('%b %d, %H:%M') if p.completed_at else '-' }}
{% endif %} {% if badges_earned %}

Badges Earned ({{ badges_earned | length }})

{% for b in badges_earned %} {% set rarity_colors = {"common": "text-text-2", "rare": "text-cyan", "epic": "text-purple", "legendary": "text-amber"} %}
{{ b.title }} {{ b.rarity }}
{{ b.earned_at.strftime('%b %d, %H:%M') if b.earned_at else '-' }}
{% endfor %}
{% endif %} {% if recent_events %}

Recent Events ({{ counts.events }} total, showing last 20)

{% for e in recent_events %} {% set sev_colors = {"info": "text-text-3", "success": "text-green", "warning": "text-amber", "danger": "text-danger"} %}
{{ e.timestamp.strftime('%b %d %H:%M') }} {{ e.summary }}
{% endfor %}
{% endif %}

Actions

Kill Sessions

Force logout — deletes all sessions. User can re-login.

Delete Profile

Removes public profile (username, bio, avatar). User can recreate it.

{{ 'Deactivate' if target_user.is_active else 'Reactivate' }} User

{{ 'Blocks login. Preserves all data.' if target_user.is_active else 'Re-enables login access.' }}

Full CTF Reset

Permanently deletes all progress, badges, events, chat, and sessions. Irreversible.

{% endblock %} {% block scripts %} {% endblock %}