# User Management

## User List and Search

The User Management page (Admin Panel → Users) displays a paginated table of all registered users with the following columns:

- Name — User's full name with avatar
- Email — Login email address
- Plan — Current subscription plan (or "Free" / "No Plan")
- Status — Active, Suspended, or Pending verification
- Registered — Date the account was created
- Last Login — Most recent login timestamp
- Actions — Edit, Suspend, Impersonate, Delete

Use the search bar at the top to find users by name, email, or plan. You can also filter by status (Active, Suspended, All) and sort by any column.

## Creating Users

Admins can create user accounts manually, bypassing the normal registration flow.

1. Click Create User at the top of the user list.
2. Fill in the required fields:
   - Name
   - Email address
   - Password (or check "Send password reset email" to let the user set their own)
3. Optionally assign a subscription plan.
4. Optionally set the user as an admin (grants access to the admin panel).
5. Click Create.

The user will receive a welcome email with their login details (if email notifications are enabled).

## Suspending and Unsuspending

Suspending a user immediately revokes their access to MailTrixy without deleting their account or data.

- To suspend: Click the Suspend button on the user's row, or open their profile and click Suspend Account. You can optionally add a reason.
- Effect: The user is logged out immediately. On their next login attempt, they see a "Your account has been suspended" message. All AI auto-replies for their email accounts are paused. Their data remains intact.
- To unsuspend: Click Unsuspend on the user's row. Their access is restored immediately and AI services resume.

## Impersonation

Impersonation lets an admin log in as any user to see exactly what they see and troubleshoot issues.

1. Click the Impersonate button on the user's row.
2. You will be logged in as that user. A banner at the top of the screen indicates you are impersonating.
3. You can view their inbox, settings, Knowledge Base, and everything else as if you were them.
4. To stop impersonating, click Return to Admin in the banner.

> Note: Impersonation is logged. Every impersonation session is recorded with the admin user, target user, start time, and end time for audit purposes.

## Bulk Operations

Select multiple users using the checkboxes in the user list to perform bulk actions:

- Bulk suspend: Suspend all selected users at once.
- Bulk unsuspend: Reactivate all selected users.
- Bulk plan change: Move all selected users to a different subscription plan.
- Bulk delete: Permanently delete selected users and all their data. This action requires confirmation and cannot be undone.
- Bulk email: Send a notification email to all selected users.

## User Export and Import

### Export

Export your user list as a CSV file for reporting or migration purposes.

1. Click Export at the top of the user list.
2. Choose which fields to include (name, email, plan, registration date, etc.).
3. Choose the format (CSV or XLSX).
4. Click Download.

### Import

Bulk-import users from a CSV file (useful for migration from another platform).

1. Click Import at the top of the user list.
2. Download the CSV template to see the required format.
3. Fill in the template with user data (name, email, password are required; plan is optional).
4. Upload the CSV file.
5. MailTrixy will preview the import and flag any issues (duplicate emails, invalid data).
6. Confirm to proceed. Users will be created and optionally sent welcome emails.