Staff user accounts are managed fromDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/JAQA20/LaComanda/llms.txt
Use this file to discover all available pages before exploring further.
views/admin/usuarios.php, accessible only to administrators (rol_id=1). From this view, admins can create new accounts for waiters, kitchen staff, and baristas; update existing user details and passwords; and deactivate or permanently remove accounts that are no longer needed. Each user account is tied to a specific role that determines which parts of the application they can access.
User Fields
| Field | Type | Description |
|---|---|---|
nombre | string (max 100) | Required. The user’s first name. |
apellido | string (max 100) | Required. The user’s last name. |
email | string (max 100) | Required, unique. Used as the login credential. Must not already exist in the users table. |
password | string (min 8 chars) | Required on create, optional on edit. Leave blank when editing to keep the existing password. |
rol_id | integer | Required. Role assignment: 1 = Admin, 2 = Mesero, 3 = Cocina, 4 = Barista. |
activo | boolean | Default 1. Inactive users (activo=0) cannot log in, but their records and order history are preserved. |
Creating a User
New user accounts are created through the form atviews/admin/nuevoUsuario.php, which submits to:
- All required fields (
nombre,apellido,email,password,rol_id) must be present and non-empty. passwordmust be at least 8 characters long.- The
passwordconfirmation field must exactly match the password field. - The provided
emailmust be unique — if another active user already has that email, the request is rejected.
Editing a User
Existing user records can be updated via the form at:Deleting a User
To permanently remove a user account, submit:| Parameter | Description |
|---|---|
id | The ID of the user to delete |
- The root admin account (
id=1) cannot be deleted under any circumstances. - An admin cannot delete their own account — the currently authenticated user’s ID is checked against the target ID.
Email must be unique across all users. Re-using an email from a deleted user is allowed since deleted records are removed from the table entirely.