The Administrator role has unrestricted access to every module in PortalHub. Admins are the only users who can create accounts, assign clients to advisors, issue password resets, broadcast system-wide messages, and review executive-level reports. This guide walks through each capability in detail so that administrators can manage the portal confidently from day one.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Nieto2020/portalhub/llms.txt
Use this file to discover all available pages before exploring further.
Capabilities Overview
User Management
Create, activate, deactivate, and permanently delete user accounts across all roles.
Client–Advisor Assignments
Pair clients with the right advisor, record a reason for the change, and review the full assignment history.
Reports & Dashboard
Monitor executive KPIs — active clients, pending payments, scheduled appointments, and service progress — all in real time.
Announcements
Publish announcements that surface immediately in every user’s portal feed.
Password Resets
Generate a secure 10-character temporary password for any account. Every reset is recorded in the audit log.
Bulk Messaging
Send a direct inbox message or a bell notification to every user simultaneously, with optional role-based filtering.
User Management
Only administrators can create user accounts. New users are created directly via the Gestión de Usuarios page and are provisioned with a temporary password that must be changed on first login.Creating a User
Open User Management
Navigate to Panel Administrativo → Control de Accesos (
/admin/gestion_usuarios.html).Fill in the registration form
Provide the following fields:
| Field | Required | Notes |
|---|---|---|
correo | ✅ | Must be a valid, unique email address |
password | ✅ | Temporary password; the user must change it on first login |
id_rol | ✅ | See role table below |
numero_cliente | ❌ | Optional client number, e.g. CLI-002 |
Role Codes
| Role | id_rol | Constant |
|---|---|---|
| Administrator | 1 | ROL_ADMIN |
| Advisor (Asesor) | 2 | ROL_ASESOR |
| Client (Cliente) | 3 | ROL_CLIENTE |
Every account created through
crear.php is inserted with require_password_change = 1. The user will be redirected to the password-change screen immediately after their first successful login.Activating and Deactivating Users
Select a user in the table to copy their ID into the Gestión de Estado panel, then choose the appropriate action.estado = inactivo) cannot log in but all their data is preserved. Reactivate them at any time by sending "accion": "activar".
Deleting a User
To delete, enter the user ID into the management panel and click ELIMINAR DEFINITIVAMENTE. The frontend presents a confirmation dialog before dispatching:Password Reset
Admins can generate a new temporary password for any user without knowing the existing one.Locate the user
Find the user in the table by ID, email, or client number, then note their
id_usuario.reset_log.php internally, which writes a row to the reset_logs table recording the id_admin (the acting administrator’s id_usuario), the id_usuario_afectado (the target user), and a fecha_reseteo timestamp. Use Control de Accesos → Ver Log de Resets to audit all past resets.
Client–Advisor Assignments
Assignments connect a client account to the advisor who will handle their accounting work. The system keeps a full history of all past assignments.Creating an Assignment
id_cliente has role ROL_CLIENTE (3) and id_asesor has role ROL_ASESOR (2). If the client already has an active assignment, that record is automatically closed (estado = 'inactivo', fecha_fin stamped) before the new one is inserted. The affected client receives an in-portal notification confirming the change.
Assignment object fields
Assignment object fields
| Field | Type | Description |
|---|---|---|
id_asignacion | int | Auto-incremented primary key |
id_cliente | int | FK → usuarios.id_usuario |
id_asesor | int | FK → usuarios.id_usuario |
id_asignador | int | Admin who created the record |
motivo_cambio | text | Reason for the assignment or change |
estado | enum | activo / inactivo |
fecha_asignacion | timestamp | Set automatically on insert |
fecha_fin | timestamp | Populated when the assignment is closed |
Viewing Assignment History
fecha_asignacion descending. Use this to audit advisor changes and verify continuity of service.
Listing All Current Assignments
activo assignments. Only accessible to ROL_ADMIN.
Dashboard & Reports
Executive KPIs
The admin dashboard fetches live data from two endpoints simultaneously and displays six key performance indicators:| KPI Card | Source field | Description |
|---|---|---|
| Active Clients | usuarios → filtered by role + estado | Clients with estado = activo |
| Advisors | usuarios → filtered by role | Total advisor accounts |
| Procedures In Progress | servicios.en_proceso | servicios_contables with estado = 'En proceso' |
| Completed Procedures | servicios.completados | servicios_contables with estado = 'Completado' |
| Pending Payments | pagos.pendientes + pagos.monto_total | Count and sum from pagos_facturacion |
| Scheduled Appointments | citas.programadas | citas with estado = 'Programada' |
Viewing All Reports
Navigate to Panel Administrativo → Ver Reportes (/admin/reportes.html). The page loads all advisor-authored reports from GET /backend/modules/reportes/listar.php and supports filtering by:
- Tipo: Mensual · Trimestral · Anual · Especial
- Estado: Borrador · Publicado · Archivado
- Search: matches report title or advisor name
contenido, descripcion, advisor name, and creation date. The top strip also shows aggregate stats: total reports, published count, and number of active advisors who have filed at least one report.
The Calificaciones de Asesores section below the reports table pulls from GET /backend/modules/calificaciones/estadisticas.php and ranks advisors by average star rating.
Announcements
Administrators can publish announcements that appear in the notification feed of all portal users.Navigate to the announcements module
Go to Panel Administrativo → Inbox or use the dedicated announcements shortcut. The creation endpoint is:
Compose the announcement
Supply a
titulo and contenido. The record is stored in the anuncios table and becomes immediately visible to all authenticated users who visit the portal.Bulk Messaging
Use the Comunicación Masiva widget on the admin dashboard to push a direct inbox message or bell notification to every user at once.rolescontrols who receives the message:1= Admins,2= Asesores,3= Clientes.- Omitting
roles(or sending an empty array) defaults to all three groups. - The sending admin is always excluded from the recipient list.
- For bell notifications instead of inbox messages, use
POST /backend/modules/notificaciones/crear_masivo.phpwith the same payload.