| Version 6 (modified by , 2 weeks ago) ( diff ) |
|---|
UseCase002 - Logging in as user
Initiating actor: Logged-Out User
The goal of this use case is to allow an existing user to authenticate their identity and gain access to their personalized account features. The system verifies the provided credentials against the stored records in the User table to establish a secure session. Successful authentication enables the user to act as a Logged-In Consumer or Logged-In Admin depending on their account type.
Scenario
- User enters their
emailandpasswordinto the login interface and submits the form.
- System retrieves the user record from the database to verify the credentials and determine the user's role.
SELECT user_id, email, password FROM User WHERE email = 'user@example.com';
- System checks the Admin and Consumer tables to identify the specific permissions and attributes associated with that user_id.
SELECT user_id, points_collected FROM Consumer WHERE user_id = @authenticated_user_id; SELECT user_id, type, discount_percentage FROM Admin WHERE user_id = @authenticated_user_id;
- System grants access and redirects the user to the appropriate dashboard based on the results.
Note:
See TracWiki
for help on using the wiki.
