Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/DanielRivera03/SistemaBancario/llms.txt

Use this file to discover all available pages before exploring further.

User registration and account management are exclusively reserved for the Administrator role (Role 1). Administrators create accounts for all other users — whether internal staff (Presidency, Management, Customer Service) or external clients — assign roles, upload identity documents, and control account status throughout a user’s lifecycle. All remaining roles have limited self-service access to update their own profile details, but cannot create, deactivate, or delete other accounts.

New User Registration Flow

1

Navigate to the Registration Route

The administrator navigates to the user registration interface via the query parameter:
?cashmanhagestion=registro-usuarios-administrador
2

Submit Basic Credentials

The admin provides the user’s core account data: first name, surname, unique user code (codigousuario), email address, password, and role assignment. These are saved via RegistroClientesAdministradores(), which calls SP RegistrarNuevosClientesAdministradores.
$objGestiones->setNombresUsuarios($_POST['nombres']);
$objGestiones->setApellidosUsuarios($_POST['apellidos']);
$objGestiones->setCodigoUsuarios($_POST['codigousuario']);
$objGestiones->setCorreoUsuarios($_POST['correo']);
$objGestiones->setIdRolUsuarios($_POST['idrol']);
$resultado = $objGestiones->RegistroClientesAdministradores();
At this point the new user has habilitarsistema = 'no' and completoperfil = 'no' by default. The account is not yet usable.
3

Complete the Full Profile

The administrator completes the user’s profile at the detail registration route, passing the unique code as a URL parameter:
?cashmanhagestion=registro-detalles-usuarios-administrador&codigounicousuario=<CODE>
The method RegistroNuevosDetallesPerfilUsuarios() calls SP RegistrarDetallesUsuarios_Clientes and stores the full personal and employment information (DUI, NIT, phone numbers, address, company, job title, birthdate, gender, marital status).
4

Upload Identity Documents

Four document files are uploaded and saved to dedicated server directories. Each file is renamed using the pattern <date>_<uniqid()>_<originalfilename> to avoid collisions.
DocumentServer Path
DUI (front)vista/images/fotoduifrontal/
DUI (back)vista/images/fotoduireverso/
NITvista/images/fotonit/
Signaturevista/images/fotofirmas/
The stored file names are recorded in the detallesusuarios table via the same RegistrarDetallesUsuarios_Clientes stored procedure call.
5

Generate Printable Credential Report

After completing the profile, the administrator can generate a printable PDF credential sheet for the new user, accessible at:
?cashmanhagestion=mostrar-informe-nuevos-clientes-administrador
The PDF is produced using the FPDF library and contains the user’s login credentials and assigned role.

Account Status Management

Administrators can change any user’s account state at any time. All three operations respond with JSON for seamless AJAX handling on the front end.
ActionModel MethodStored ProcedureResulting estado_usuario
DeactivateDesactivarUsuariosClientes()DesactivarUsuarios_Clientesinactivo
BlockBloquearUsuariosClientes()BloquearUsuarios_Clientesbloqueado
ReactivateReactivarUsuariosClientes()ReactivarUsuarios_Clientesactivo
// Example — block a user account via AJAX
$objGestiones->setIdUsuarios($_POST['idusuarios']);
$resultado = $objGestiones->BloquearUsuariosClientes();
echo json_encode($resultado);

Self-Service Profile Updates (All Roles)

All authenticated users, regardless of role, can update their own personal and employment details using ActualizacionDetallesPerfilUsuarios(), which calls SP ActualizarDetallesUsuarios. Editable fields include:
  • DUI number, NIT number
  • Phone, cell phone, work phone
  • Home address, company name, job title, work address
  • Birthdate, gender, marital status

Gender-Based Localisation

When the user’s genero field is "f" (female), marital status values are automatically converted to their feminine grammatical form before being stored. For example:
Input (masculine)Stored (feminine)
SolteroSoltera
CasadoCasada
DivorciadoDivorciada
ViudoViuda

usuarios Table — Key Fields

ColumnTypeDescription
idusuariosintPrimary key
nombresvarcharFirst name(s)
apellidosvarcharSurname(s)
codigousuariovarcharUnique login code (unique constraint)
contraseniavarcharHashed password
correovarcharEmail address (unique constraint)
fotoperfilvarcharProfile photo filename
idrolintForeign key to roles table
estado_usuariovarcharactivo, inactivo, or bloqueado
completoperfilenum'si' or 'no' — set automatically by trigger
habilitarsistemaenum'si' or 'no' — controls platform access
nuevousuarioenum'si' — flags that the user must change credentials on first login
poseecuentaenum'si' or 'no' — whether the client has a savings account
poseecreditoenum'si' or 'no' — whether the client has an active credit

Role Management (Administrator Only)

Administrators can create and maintain the platform’s role definitions through five dedicated routes and model methods.
OperationModel MethodDescription
Create roleRegistroNuevosRolesUsuarios()Register a new user role with name and description
List all rolesConsultarRolesUsuariosRegistrados()Retrieve all defined roles
View single roleConsultaRolesUsuariosEspecifica()Fetch details of one specific role
Update roleModificarRolesUsuarios()Edit an existing role’s name or description
Delete roleEliminarRolesUsuarios()Remove a role (ensure no users are assigned to it first)
Newly registered users always start with habilitarsistema = 'no' and completoperfil = 'no'. Once the administrator saves the full profile details (Step 3 above), the database trigger ComprobacionCompletarPerfilUsuarios fires automatically on the detallesusuarios table and sets completoperfil = 'si' on the parent usuarios row — no additional application call is needed. The administrator must still manually set habilitarsistema = 'si' to grant the user access to the platform.

Build docs developers (and LLMs) love