Milk Admin

User Management Guide

This guide explains how to manage users from the administration panel. This documentation focuses on the backend administration interface, not the programming aspects.

Important System Characteristics

Key System Behavior
  • Username Uniqueness: Only usernames must be unique. Multiple users can have the same email address.
  • Email Login Limitation: Since multiple users can share the same email, login via email is not supported. Users must login with their username.
  • Deletion Process: Deleted users are moved to "Trash" and only permanently deleted if removed from trash.

Accessing User Management

To manage users, navigate to Users in the main menu or access directly: User List

User Status Filters

The user list provides several status filters to organize users:

  • All: Shows all users regardless of status
  • Active: Users with status = 1 (can login and use the system)
  • Suspended: Users with status = 0 (cannot login)
  • Trash: Users with status = -1 (marked for deletion)

Creating New Users

Basic User Creation

  1. Click "Add New" button on the user list page
  2. Fill in the required fields:
    • Username: Must be unique (this is what users will login with)
    • Email: Can be shared by multiple users
    • Password: Optional (see welcome email section below)
    • Status: Active (1) or Suspended (0)
    • Administrator: Check if user should have admin privileges
  3. Configure permissions if not an administrator
  4. Choose email options (see below)
  5. Click "Save"

Welcome Email vs Manual Password Setting

Send Welcome Email (Recommended)

When to use: For new user accounts

How it works:

  • Check "Send welcome email" option
  • Leave password field empty
  • System sends email with activation link
  • User clicks link to set their own password

Benefits: Secure, user-controlled password, email verification

Manual Password Setting

When to use: For immediate access or internal testing

How it works:

  • Enter password in password field
  • Leave "Send welcome email" unchecked
  • User can immediately login
  • No email is sent

Note: You must communicate the password to the user separately

Editing Existing Users

Basic User Editing

Click the "Edit" action next to any user in the list to modify their details:

  • Change username, email, or status
  • Modify permissions
  • Promote/demote admin status

Password Reset via Admin Panel

To reset a user's password:

  1. Edit the user
  2. Choose one of two methods:
    Email Reset (Recommended):
    • Check "Send Email to Reset Password"
    • Leave password field empty
    • User receives email with reset link
    • User sets new password securely
    Manual Password Reset:
    • Enter new password in password field
    • Leave "Send Email to Reset Password" unchecked
    • Password is changed immediately
    • No email notification sent
  3. Click "Save"

User Deletion Process

Two-Stage Deletion Process

This system uses a two-stage deletion process for user safety:

Stage 1: Move to Trash

  • Click "Trash" button when editing a user
  • User status changes to -1 (Trash)
  • User cannot login but data is preserved
  • User appears in "Trash" filter
  • Can be restored at any time

Stage 2: Permanent Deletion

  • Go to Trash filter to see deleted users
  • Click "Definitely Delete" on trashed user
  • User is permanently removed from database
  • This action cannot be undone!

Restoring Users from Trash

To restore a user from trash:

  1. Go to User List and click "Trash" filter
  2. Select users to restore
  3. Use bulk action "Restore" or edit individual user and change status to Active

Bulk Actions

The user list supports bulk operations for efficiency:

Available Bulk Actions

Action Available For Description
Trash Active/Suspended users Move selected users to trash (soft delete)
status Active Any non-deleted users Set status to 1 (activate users)
status Suspended Any non-deleted users Set status to 0 (suspend users)
Restore Trash users only Restore users from trash to active status
Delete Trash users only Permanently delete users (cannot be undone)

Using Bulk Actions

  1. Select users using checkboxes
  2. Choose action from dropdown
  3. Click "Apply" button
  4. Confirm action when prompted

User Permissions

Administrator vs Regular Users

  • Administrator: Full access to all system features
  • Regular Users: Access controlled by permission system

Permission Management

When creating or editing non-admin users:

  1. Uncheck "Administrator" option
  2. Configure specific permissions in the permissions section
  3. Permissions are organized by modules and functions
  4. Grant only necessary permissions following principle of least privilege

Search and Filtering

User Search

Use the search box to find users by:

  • Username
  • Email address
  • User ID

Status Filtering

Click status filters to view specific user groups:

  • All: Complete user list
  • Active: Users who can login
  • Suspended: Users who cannot login
  • Trash: Users marked for deletion

Email System Behavior

Email Automation Rules
  • Welcome emails: Sent only when "Send welcome email" is checked during user creation
  • Password reset emails: Sent only when "Send Email to Reset Password" is checked during editing
  • Manual password setting: Never triggers automatic emails
  • Status changes: No automatic email notifications

Email Templates

The system uses predefined email templates for:

  • Welcome emails (new user account activation)
  • Password reset emails (admin-initiated)
  • User-initiated password reset (forgot password)

Security Considerations

Important Security Notes
  • Username Policy: Usernames must be unique - this is enforced by the system
  • Email Policy: Multiple users can share the same email address
  • Login Method: Users must login with username, not email
  • Admin Privileges: Be careful when granting administrator access
  • Soft Deletion: Use trash system to prevent accidental data loss
  • Password Security: Prefer email-based password setting over manual entry

Common Administrative Tasks

Creating a New Administrator

  1. Create new user with unique username
  2. Check "Administrator" option
  3. Use "Send welcome email" for secure password setup
  4. Verify admin can login before removing other admin accounts

Handling Locked Out Users

  1. Check user status (may be suspended)
  2. Reset password using email method
  3. Change status to Active if needed
  4. Inform user to check their email

User Account Cleanup

  1. Identify inactive users
  2. Move to trash (soft delete)
  3. Review trashed users periodically
  4. Permanently delete only when certain data is no longer needed

Troubleshooting

Common Issues

Problem Possible Cause Solution
Cannot create user with existing username Username already exists Choose a different username (usernames must be unique)
User cannot login with email System doesn't support email login User must login with username instead
Welcome email not sent "Send welcome email" not checked Edit user and use password reset email option
User disappeared from list User may be in trash Check "Trash" filter and restore if needed
Cannot delete user permanently User not in trash yet Move to trash first, then permanently delete from trash view
Loading...