> For the complete documentation index, see [llms.txt](https://docs.pteroca.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pteroca.com/using-pteroca/admin-panel/managing-users.md).

# Managing Users

As an administrator, you can create, edit, and manage user accounts in PteroCA. This guide covers all user management functions.

## Accessing User Management

To manage users:

1. Click **Users** in the admin sidebar
2. You'll see a list of all registered users

**Required permission:** `access_users` or `admin` role

## User List

### User List View

The user list displays:

* **Email** - User's email address (unique identifier)
* **Name** - First and last name (if provided)
* **Balance** - Current wallet balance
* **Verified** - Email verification status
* **Blocked** - Whether account is blocked
* **Roles** - Assigned roles (admin, user, custom)
* **Created** - Registration date
* **Actions** - Edit, delete, view servers

### Filtering and Search

**Search for users:**

* By email address
* By name
* By ID

**Filter users:**

* Verified vs. unverified
* Blocked vs. active
* By role
* By registration date

## Creating New Users

### How to Create a User

1. Click **Create User** or **Add New** button
2. Fill in the required information
3. Configure options
4. Save to create account

### Required Fields

#### Email Address

**Requirements:**

* Valid email format
* Unique (not already registered)
* Will be used for login and notifications

{% hint style="warning" %}
**Email Uniqueness**

Each email can only be used once. If you try to create a user with an existing email, you'll get an error.
{% endhint %}

#### Password

**When creating a user:**

* Set initial password
* User can change it later
* Must meet password requirements

**Password requirements:**

* Minimum length (typically 8-12 characters)
* May require uppercase, lowercase, numbers, symbols

**Security tip:** Generate strong random passwords for new accounts.

### Optional Fields

#### First Name and Last Name

* User's full name
* Helps identify users in support tickets
* Used in email communications

#### Avatar

* Upload profile picture for user
* Will display in dashboard and Pterodactyl Panel
* Accepts JPG, PNG, GIF

### User Configuration

#### Balance

**Starting balance:**

* Set initial wallet balance
* Can be $0 or any amount
* Useful for promotional credits or compensations

**Use cases:**

* Give new users free credits
* Compensate for service issues
* Manual payment crediting

#### Roles

**Assign user roles:**

* **user** - Default role (client access)
* **admin** - Full administrative access
* **Custom roles** - Your defined roles with specific permissions

**Multiple roles:**

* Users can have multiple roles
* Permissions are combined
* More permissive permission wins

See [Roles & Permissions](/access-and-permissions/access-control/roles-and-permissions.md) for details.

#### Email Verification Status

**isVerified checkbox:**

* **Checked** - Mark email as verified
* **Unchecked** - Email needs verification

**When to manually verify:**

* Technical issues preventing auto-verification
* Migrating users from another system
* Compensating for email delivery problems
* VIP/known customers

#### Account Block Status

**isBlocked checkbox:**

* **Checked** - Account is blocked (cannot log in)
* **Unchecked** - Account is active

**When to block accounts:**

* Fraudulent activity
* Terms of Service violations
* Payment disputes
* Abuse or spam
* Account security issues

{% hint style="info" %}
**Blocked vs. Suspended Servers**

Blocking an account prevents login but doesn't automatically suspend servers. Handle servers separately if needed.
{% endhint %}

### Pterodactyl Synchronization

**Automatic sync:**

* Creating a user in PteroCA automatically creates a Pterodactyl account
* Email, name, and password are synchronized
* Avatar is synced
* User can log into Pterodactyl with same credentials

**SSO integration:**

* Users can access Pterodactyl from PteroCA without re-entering password
* Password changes sync automatically

## Editing Users

### How to Edit a User

1. Find the user in the user list
2. Click **Edit** action
3. Modify fields
4. Save changes

### Editable Fields

Most user fields can be edited:

* **Email** (disabled in some cases for security)
* **First and last name**
* **Avatar**
* **Balance** - Add or deduct funds
* **Roles** - Change assigned roles
* **isVerified** - Toggle verification status
* **isBlocked** - Block or unblock account
* **Password** - Reset user's password

### Modifying Balance

**Adjusting user balance:**

1. Edit user
2. Find **Balance** field
3. Enter new balance amount
4. Save changes

**Use cases:**

* Add promotional credits
* Refund for service issues
* Correct billing errors
* Manual payment processing

{% hint style="success" %}
**Transaction Logging**

Balance changes are logged in system logs. Always include a reason when manually adjusting balances for audit trail.
{% endhint %}

### Changing User Roles

**To modify roles:**

1. Edit user
2. Find **Roles** field
3. Select/deselect roles
4. Save changes

**Common scenarios:**

* Promote user to admin
* Create support staff role
* Demote admin to user
* Assign custom role

**Effects:**

* New permissions take effect immediately
* User may need to log out/in to see menu changes
* Access is checked on every page load

### Regenerating a User's Pterodactyl API Key

Administrators can regenerate the Pterodactyl API key associated with a user account. This is useful when a user's key has been compromised or when troubleshooting authentication issues.

**To regenerate:**

1. Open the user's detail or edit page in the admin panel.
2. Click the **Regenerate Pterodactyl API Key** button.
3. The new key is automatically synchronized with Pterodactyl.

> **Note:** After regeneration, any existing integrations using the old API key will need to be updated.

### Resetting Passwords

**As administrator:**

1. Edit user
2. Find **Password** field
3. Enter new password
4. Confirm new password
5. Save changes

**What happens:**

* User's password is changed immediately
* User is NOT notified automatically (unless you enable notifications)
* Password syncs to Pterodactyl
* User can log in with new password

{% hint style="warning" %}
**Password Reset Communication**

If you reset a user's password, contact them separately (email, ticket, etc.) to provide the new password. The system doesn't send automatic notification.
{% endhint %}

### Verifying Email Manually

**If user can't verify email:**

1. Edit user
2. Check **isVerified** checkbox
3. Save changes
4. User can now purchase servers (if verification was required)

**When to use:**

* Email delivery issues
* Known legitimate user
* Migration from old system
* Corporate/institutional emails blocking verification emails

## Deleting Users

### Soft Delete

PteroCA uses **soft delete** for user accounts:

* User is marked as deleted but not removed from database
* Can be restored if needed
* Maintains data integrity

### How to Delete a User

1. Find user in list
2. Click **Delete** action
3. Confirm deletion

### Deletion Restrictions

**Cannot delete user if:**

* User has active servers

**Why?**

* Prevents orphaned servers
* Ensures data consistency

**To delete user with servers:**

1. Delete or transfer all user's servers first
2. Then delete user account

### Restoring Deleted Users

Soft-deleted users are automatically restored when an administrator creates a new user with the same email address. Instead of producing a duplicate-email error, the system detects the existing soft-deleted account, reactivates it, and applies the new account details.

**How it works:**

1. Go to **Create User** in the admin panel.
2. Enter the email address of the previously deleted user.
3. The system automatically restores the soft-deleted account with the new details you provide.

{% hint style="info" %}
**Automatic Restoration**

There is no manual "Restore" button. Restoration happens automatically through the user creation flow when the email matches a soft-deleted account.
{% endhint %}

## Viewing User Servers

**To see a user's servers:**

1. Click on user in user list
2. View **Servers** tab or section
3. List of all servers owned by that user

**What you can see:**

* Server names
* Server status (active, suspended)
* Server expiration dates
* Product information

**Quick actions:**

* Jump to server management
* Suspend/unsuspend server
* View server details

## User Activity Logs

**Track user actions:**

* Login history
* Server purchases
* Server renewals
* Balance changes
* Configuration changes

**How to view:**

1. Navigate to **Logs** → **System Logs**
2. Filter by user email or ID
3. View all actions taken by that user

See [Logs & Monitoring](/using-pteroca/admin-panel/logs-and-monitoring.md) for details.

## Bulk Operations

Depending on your PteroCA configuration, you may be able to:

### Bulk Actions

The only available bulk action is **batch delete**, which is provided by the EasyAdmin framework by default.

**How to use:**

1. Select users using checkboxes
2. Choose the delete action from the bulk actions dropdown
3. Confirm action
4. Operation applies to all selected users

## User Notifications

### Email Notifications

Users receive emails for:

* **Account created** - Welcome email with login details
* **Password changed** - Security notification
* **Balance added** - Payment confirmation
* **Server purchased** - Purchase confirmation
* **Server expiring** - Renewal reminders
* **Server suspended** - Suspension notification

### Admin-Triggered Emails

As admin, you can trigger:

* Password reset emails (if feature enabled)
* Custom notifications (if configured)
* Verification email resend

## Security and Privacy

### Viewing User Data

**What you can access:**

* Email, name, profile
* Balance and payment history
* Server list
* Activity logs
* Login history

**What you CANNOT see:**

* Plain-text passwords (only hashed)
* Credit card details (handled by payment gateways)

### Data Protection

**Best practices:**

* Only access user data when necessary
* Don't share user information
* Respect privacy
* Follow data protection regulations (GDPR, etc.)

### Account Security

**Protecting user accounts:**

* Enforce strong passwords
* Enable email verification
* Monitor for suspicious activity
* Block compromised accounts
* Audit admin actions

## Troubleshooting

### User Can't Log In

**Possible causes:**

* Wrong email or password
* Account blocked
* Email not verified (if required)
* Account deleted

**Solutions:**

1. Check if account is blocked (unblock if appropriate)
2. Verify email verification status
3. Reset password if forgotten
4. Check if account was deleted

### User Not Showing in List

**Possible causes:**

* Recently created (page not refreshed)
* Filters applied
* Account deleted
* Search criteria too specific

**Solutions:**

* Refresh page
* Clear all filters
* Check deleted users list
* Broaden search criteria

### Cannot Delete User

**Error: "User has active servers"**

**Solution:**

1. View user's server list
2. Delete or transfer all servers
3. Try deleting user again

### Balance Not Updating

**If manual balance change doesn't save:**

1. Check for validation errors
2. Ensure amount is valid number
3. Verify permission to edit users
4. Check system logs for errors
5. Contact support if persistent

### Role Changes Not Taking Effect

**If permission changes don't work:**

1. Verify role was saved
2. Ask user to log out and log in again
3. Clear browser cache
4. Check role has correct permissions assigned
5. See [Roles & Permissions](/access-and-permissions/access-control/roles-and-permissions.md)

## Best Practices

### User Management

**Do:**

* Verify identities before making sensitive changes
* Document reason for manual balance adjustments
* Use custom roles for specialized access
* Regularly audit user permissions
* Monitor for inactive accounts
* Communicate password resets to users

**Don't:**

* Share admin credentials
* Give admin access unnecessarily
* Delete users without backing up data
* Modify balances without reason
* Ignore suspicious activity

### Security Practices

* Review user activity logs regularly
* Block suspicious accounts immediately
* Verify email before manually setting verified status
* Use strong passwords when creating accounts
* Enable email verification by default
* Audit admin actions monthly

### Communication

* Inform users of account changes
* Provide clear instructions for password resets
* Respond to verification issues promptly
* Set expectations for support response times

## Related Guides

* [Managing Servers](/using-pteroca/admin-panel/managing-servers.md) - Server administration
* [Payments & Orders](/using-pteroca/admin-panel/payments-and-orders.md) - User payment history
* [Logs & Monitoring](/using-pteroca/admin-panel/logs-and-monitoring.md) - User activity tracking
* [Access Control](/access-and-permissions/access-control/roles-and-permissions.md) - Roles and permissions
* [Vouchers](/using-pteroca/admin-panel/vouchers.md) - Promotional codes for users

## Need Help?

For user management questions:

* Check [FAQ](/help-and-maintenance/faq.md)
* Review [Troubleshooting Guide](/help-and-maintenance/troubleshooting/runtime-issues.md)
* Join [Discord Community](https://discord.com/invite/Gz5phhuZym)
* Contact technical support


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pteroca.com/using-pteroca/admin-panel/managing-users.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
