Overview
Authentication functions handle user verification and login processes in the Refugio mountain refuge reservation system.Functions
comprobar_username
Verifies a user by their email address and retrieves their account information.Database connection object
User’s email address to verify
Returns user data array on success, false on failure. User array contains:
id- User IDemail- User emailpassword- Hashed passwordrol- User rolenombre- First nameapellido1- First surname
SQL Query
Code Example
Error Handling
Errors are logged to the error log and the function returnsfalse: