User Management
User Management
ct/admin/users.phpOverview
The User Management page provides a comprehensive interface for browsing and managing all registered users on the platform. It offers both card and list view modes, advanced filtering options, and quick access to user details. This page serves as the main entry point for user administration.
Key capabilities include:
- View all registered users with real-time statistics
- Filter by account status, type, and email verification
- Search by username or email
- Switch between card view and list view
- Quick access to user details page
- Track online users, new registrations, and creators
- View pending identity verifications
System Requirements
PHP Requirements
PHP Extensions Required
mysqli- Database connectivitysession- Session managementjson- JSON encoding for data
PHP Settings
session.autostart = Off
date.timezone = Your/Timezone
Installation Requirements
Database Tables
-- CMS Users Table (main user table)
CREATE TABLE IF NOT EXISTS tblCMSUsers (
id INT(11) NOT NULL AUTOINCREMENT,
username VARCHAR(100) NOT NULL,
email VARCHAR(255) NOT NULL,
password VARCHAR(255) NOT NULL COMMENT 'Bcrypt hashed',
accountstatus ENUM('active', 'suspended', 'banned', 'pending') DEFAULT 'pending',
accounttype ENUM('free', 'premium', 'vip', 'creator', 'moderator', 'admin') DEFAULT 'free',
emailverified TINYINT(1) DEFAULT 0,
iscreator TINYINT(1) DEFAULT 0,
uploadapproved TINYINT(1) DEFAULT 0,
tokenbalance DECIMAL(10,2) DEFAULT 0,
registrationdate DATETIME DEFAULT CURRENTTIMESTAMP,
lastlogin DATETIME DEFAULT NULL,
lastactivity DATETIME DEFAULT NULL,
PRIMARY KEY (id),
UNIQUE KEY idxusername (username),
UNIQUE KEY idxemail (email),
KEY idxaccountstatus (accountstatus),
KEY idxaccounttype (accounttype),
KEY idxemailverified (emailverified),
KEY idxiscreator (iscreator),
KEY idxlastactivity (lastactivity)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4unicodeci;
-- User Verification Table (for identity verification)
CREATE TABLE IF NOT EXISTS tblUserVerification (
verificationid INT(11) NOT NULL AUTOINCREMENT,
userid INT(11) NOT NULL,
verificationstatus ENUM('none', 'pending', 'verified', 'rejected') DEFAULT 'none',
stagename VARCHAR(100) DEFAULT NULL,
iddocumenturl VARCHAR(500) DEFAULT NULL,
selfieurl VARCHAR(500) DEFAULT NULL,
submittedat DATETIME DEFAULT NULL,
reviewedat DATETIME DEFAULT NULL,
reviewedby INT(11) DEFAULT NULL,
rejectionreason TEXT DEFAULT NULL,
createdat DATETIME DEFAULT CURRENTTIMESTAMP,
updatedat DATETIME DEFAULT CURRENTTIMESTAMP ON UPDATE CURRENTTIMESTAMP,
PRIMARY KEY (verificationid),
UNIQUE KEY idxuserid (userid),
KEY idxverificationstatus (verificationstatus),
CONSTRAINT fkverificationuser FOREIGN KEY (userid)
REFERENCES tblCMSUsers (id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4unicodeci;
Account Status Reference
Account Type Reference
Config Variables
From ct/dat/config.inc.php:
$dbhost,$dbuser,$dbpasswd,$db- Database connection
File Dependencies
ct/admin/adminauth.php- Admin authenticationct/dat/config.inc.php- Configurationct/includes/header.php- Admin headerct/includes/annotateftr.php- Admin footerct/admin/css/adminvariables.css- Admin CSS variables- Font Awesome 6+ - Icon library (CDN)
Related Admin Pages
ct/admin/userdetails.php- Individual user managementct/admin/creatorsadmin.php- Creator managementct/admin/featuretoggles.php- Feature toggle settings
Features & UI Elements
Page Header
[Screenshot: users-header]
The page header displays:
- Title: "User Management"
- Icon:
fa-users - Breadcrumb: Dashboard / User Management
- Action Buttons:
- "Manage Creators" - Links to creatorsadmin.php
- "Feature Toggles" - Links to featuretoggles.php
Statistics Dashboard
[Screenshot: users-stats]
Seven statistics cards showing user counts:
Filter Panel
[Screenshot: users-filters]
A filter form with the following options:
Action Buttons:
- Search (Green) - Apply filters
- Clear (Gray) - Reset all filters
View Toggle Toolbar
[Screenshot: users-view-toolbar]
User Cards (Card View)
[Screenshot: users-card-view]
User cards displayed in a responsive grid (5 columns on large screens):
Card Elements:
- User avatar (initial letter with gradient)
- Username with verified badge (if email verified)
- Email address
- Account status badge
- Account type badge
- Creator badge (if iscreator)
- Registration date
- Last login date
- "View Details" button
Avatar Colors:
Card Border Colors:
User Table (List View)
[Screenshot: users-list-view]
Default view showing users in a table:
Verification Status Badges:
Pagination
[Screenshot: users-pagination]
- First/Last page arrows
- Previous/Next page arrows
- Page number links (5 pages visible)
- Current page highlighted
- Maintains all filter parameters
Empty State
[Screenshot: users-empty]
When no users match filters:
- Large user-slash icon
- "No Users Found" heading
- Suggestion to adjust search criteria
Step-by-Step Usage
Viewing All Users
- Navigate to Admin Panel → Users → All Users
- By default, shows all users in list view
- Users sorted by registration date (newest first)
- Click any row to view user details
Searching for Users
- Enter username or email in Search field
- Click Search button
- Results filtered to matching users
- Partial matches supported (LIKE '%term%')
Filtering by Status
- Select status from Account Status dropdown:
- Active - Currently active accounts
- Suspended - Temporarily suspended
- Banned - Permanently banned
- Pending - Awaiting activation
- Click Search to apply
- Statistics update to reflect filter
Filtering by Account Type
- Select type from Account Type dropdown:
Free - Standard usersPremium - Paid subscribersVIP - VIP members
- Creator - Content creators (uses iscreator flag)
- Moderator - Site moderators
- Admin - Administrators
- Click Search to apply
Viewing User Details
- Find the user in the list or grid
- Click the row (list view) or "View Details" button (card view)
- Opens userdetails.php with full user management
Switching View Modes
- Click Card View or List View in toolbar
- View switches immediately
- Preference saved to localStorage
- Persists on page reload
Changing Results Per Page
- Select value from "Show:" dropdown in toolbar
- Options: 10, 25, 50, 100
- Page reloads with new pagination
Finding Pending Verifications
- Note the "Pending Verification" stat card
- To view pending verifications:
Click on a user
- Check the Verification tab in userdetails.php
- Or navigate to dedicated verification page
Managing Creators
- Click Manage Creators in header
- Opens creatorsadmin.php
- Dedicated interface for creator management
Best Practices
Daily User Management
- Check New Registrations:
- Note "New Today" count
- Review new users for spam/abuse
- Verify legitimate sign-ups
- Monitor Online Activity:
- Check "Online Now" metric
- Identify peak activity times
- Monitor for unusual patterns
- Review Pending Verifications:
- Process identity verifications promptly
- Maintain verification queue
User Status Workflow
Creator Verification
User applies to become creatorIdentity verification submittedAdmin reviews in verification queue
- If approved: iscreator = 1
- User can now create content
Troubleshooting
Common Issues
No Users Displayed
Cause: Database connection or query error
Solutions:
- Check database connection in config.inc.php
- Verify tblCMSUsers table exists
- Check for SQL errors in PHP error log
- Ensure user has table access permissions
Search Returns No Results
Cause: Filter too restrictive or term mismatch
Solutions:
- Clear all filters and search again
- Check spelling of username/email
- Try partial search terms
- Remove status/type filters temporarily
Statistics Show Incorrect Counts
Cause: Database cache or query issue
Solutions:
- Refresh page to get fresh counts
- Verify COUNT queries in code:
SELECT COUNT() FROM tblCMSUsers WHERE accountstatus = 'active';
- Check database for data integrity
View Preference Not Saving
Cause: localStorage blocked or disabled
Solutions:
- Check browser allows localStorage
- Clear browser storage and retry
- View falls back to list view if unavailable
User Details Not Loading
Cause: Missing userdetails.php or invalid userid
Solutions:
- Verify userdetails.php exists
- Check user ID is valid integer
- Verify user exists in database
- Check admin authentication
Debug Queries
-- Count all users
SELECT COUNT() as total FROM tblCMSUsers;
-- Count by status
SELECT accountstatus, COUNT() as count
FROM tblCMSUsers
GROUP BY accountstatus;
-- Count by type
SELECT accounttype, COUNT() as count
FROM tblCMSUsers
GROUP BY accounttype;
-- Users online (last 15 minutes)
SELECT COUNT() FROM tblCMSUsers
WHERE lastactivity > DATESUB(NOW(), INTERVAL 15 MINUTE);
-- New today
SELECT COUNT() FROM tblCMSUsers
WHERE DATE(registrationdate) = CURDATE();
-- Pending verifications
SELECT COUNT() FROM tblUserVerification
WHERE verificationstatus = 'pending';
-- Creators
SELECT COUNT() FROM tblCMSUsers WHERE iscreator = 1;
Security Considerations
Access Control
- Admin authentication required via adminauth.php
- Session validation on page load
- Only administrators can access this page
Data Protection
- Passwords are bcrypt hashed (never displayed)
- Sensitive user data handled securely
- No bulk export functionality (intentional)
Input Validation
- Search terms sanitized for SQL
- Filter values validated against allowed options
- Pagination values cast to integers
GDPR Compliance
- User data accessible by admin only
- Individual user deletion possible via userdetails.php
- Activity logging for audit trails
Translatable Strings
{
"userstitle": "User Management",
"usersbreadcrumb": "Dashboard / User Management",
"usersmanagecreators": "Manage Creators",
"usersfeaturetoggles": "Feature Toggles",
"usersstattotal": "Total Users",
"usersstatactive": "Active",
"usersstatverified": "Email Verified",
"usersstatnewtoday": "New Today",
"usersstatonline": "Online Now",
"usersstatpending": "Pending Verification",
"usersstatcreators": "Creators",
"usersfiltersearch": "Search",
"usersfiltersearchplaceholder": "Username or email...",
"usersfilterstatus": "Account Status",
"usersfilterstatusall": "All Statuses",
"usersfilterstatusactive": "Active",
"usersfilterstatussuspended": "Suspended",
"usersfilterstatusbanned": "Banned",
"usersfilterstatuspending": "Pending",
"usersfiltertype": "Account Type",
"usersfiltertypeall": "All Types",
"usersfiltertypefree": "Free",
"usersfiltertypepremium": "Premium",
"usersfiltertypevip": "VIP",
"usersfiltertypecreator": "Creator",
"usersfiltertypemoderator": "Moderator",
"usersfiltertypeadmin": "Admin",
"usersfilteremailverified": "Email Verified",
"usersfilteremailall": "All",
"usersfilteremailverified": "Verified",
"usersfilteremailnotverified": "Not Verified",
"usersbtnsearch": "Search",
"usersbtnclear": "Clear",
"usersviewcard": "Card View",
"usersviewlist": "List View",
"usersshowing": "Showing {count} of {total} users",
"usersperpage": "Show:",
"userstableid": "ID",
"userstableuser": "User",
"userstabletype": "Type",
"userstablestatus": "Status",
"userstableemail": "Email",
"userstableverification": "Verification",
"userstableregistered": "Registered",
"userstablelastlogin": "Last Login",
"userstableactions": "Actions",
"usersviewdetails": "View Details",
"usersregistered": "Registered",
"userslastlogin": "Last Login",
"usersnever": "Never",
"usersemptytitle": "No Users Found",
"usersemptytext": "No users match your current filters. Try adjusting your search criteria.",
"usersstatusactive": "Active",
"usersstatussuspended": "Suspended",
"usersstatusbanned": "Banned",
"usersstatuspending": "Pending",
"userstypefree": "Free",
"userstypepremium": "Premium",
"userstypevip": "VIP",
"userstypecreator": "Creator",
"userstypemoderator": "Moderator",
"userstypeadmin": "Admin",
"usersverificationnone": "None",
"usersverificationpending": "Pending",
"usersverificationverified": "Verified",
"usersverificationrejected": "Rejected"
}
Related Documentation
- User Details - Individual user management
- Creator Management - Creator administration
- Feature Toggles - Feature configuration