Admin Guide
This page describes the user-management features available to
accounts with the admin role.
Accessing user management
Once logged in as an administrator, a "User management" link
appears in the navigation, pointing to /admin/users. This page is
only reachable by the admin role (see
Roles and Routing).
User list (/admin/users)
Shows every registered user with:
- Username
- Role (human-readable label from
config/roles.php) - Registration date
- Actions: Edit, and Delete (hidden for your own account — you cannot delete yourself)
Creating a user (/admin/users/new)
A form to create an account directly, without the person going
through /register themselves. Fields:
- Username (must be unique)
- Email (optional)
- Password (minimum 8 characters)
- Role (any of the roles in
config/roles.php, includingadmin)
Unlike self-registration, an admin-created account can be given any
role immediately — it doesn't have to start as pending.
Editing a user (/admin/users/edit?id=...)
Lets you change:
- Role
- Password (optional — leave the field empty to keep the existing password unchanged)
This is the normal way to approve a pending registration: open the
user, change the role to role1/role2/role3/admin, and save.
Deleting a user (/admin/users/delete?id=...)
Shows a confirmation page before permanently deleting the account. You cannot delete your own account through this page (to avoid accidentally locking yourself out of the admin area).
Approving new registrations
- A new user signs up via
/registerand receives thependingrole automatically. - They can log in right away, but
/dashboardonly shows a message that their account is awaiting approval — no other protected page is accessible topendingusers. - An administrator opens
/admin/users, finds the account, clicks Edit, and assigns a proper role. - The user now has access according to their new role the next time they load a page (role checks read from the session, which is set at login — see the note below).
Note: role changes take effect the next time the affected user logs in, because the role is cached in their session at login time (
$_SESSION['role'], set inattemptLogin()inapp/auth.php). If you need role changes to apply immediately without a re-login, you'd need to re-check the role against the database on every request instead of relying on the session value.