Overview
The User model handles user authentication and basic user data retrieval operations. File:app/models/User.php
Methods
findByEmail
Finds a user by their email address.The email address to search for
Returns user record as associative array, or
false if not foundfindById
Finds a user by their ID (returns limited fields for security).The user ID to search for
Returns user record (without password) as associative array, or
false if not foundgetAllStudents
Retrieves all users with the ‘student’ role. SQL Query:Returns array of student user records