| Version 2 (modified by , 8 days ago) ( diff ) |
|---|
Use-case 0009 - Delete User
Initiating actor: Admin
Other actors: Pet Owner / Pet Sitter
Description: The Admin moderates the platform by reviewing user behavior. If a user is problematic, the admin can completely remove them. To satisfy database constraints, the system first clears their active bookings, then deletes the user (which cascades to delete their pets and reviews).
Scenario:
- Admin opens the "Manage Users" dashboard.
- System fetches a list of all registered users on the platform:
SELECT user_id, username, first_name, last_name, email FROM users ORDER BY username ASC;
- Admin clicks the "Delete" button next to a specific user.
- System executes the deletion cleanly:
DELETE FROM bookings WHERE owner_id = (SELECT user_id FROM users WHERE username = 'owner_marko'); DELETE FROM users WHERE username = 'owner_marko';
Note:
See TracWiki
for help on using the wiki.
