| Version 6 (modified by , 17 hours ago) ( diff ) |
|---|
User Login
Actors: Registered User (USER / ADMIN / INSTRUCTOR)
1. Check if User Exists.”.
The system checks whether a user with the given email exists in the database.
SELECT id, password, role FROM user_entity WHERE email = :email;
2. Password Validation (Application Logic).
# The entered password is compared with the stored hashed password.
# If the password is invalid, the login process is stopped.
# If the password is valid, the process continues.
3. Load User Type Based on Role.
After successful authentication, the system loads the user type according to the role.
# If the role is USER:
SELECT id FROM users WHERE id = :userId;
# If the role is ADMIN:
SELECT id FROM administrators WHERE id = :userId;
# If the role is INSTRUCTOR:
SELECT id FROM instructors WHERE id = :userId;
Note:
See TracWiki
for help on using the wiki.
