| title | Delete a User |
|---|---|
| description | Guide to safely deleting users with GDPR compliance |
| layout | ../../../layouts/MainLayout.astro |
Deleting a user is a critical operation that removes all personal data associated with that user from your school. This feature is designed to comply with GDPR and other data protection regulations.
Important: User deletion is permanent and cannot be undone. All personal data will be removed, and business entities will be transferred to the admin performing the deletion.
When you delete a user, CourseLit performs two main operations:
- Business Entity Migration: Transfers ownership of courses, communities, email templates, and other business-critical resources to the admin performing the deletion
- Personal Data Cleanup: Permanently removes all personal data associated with the user
To delete a user, you must have the Manage Users permission. Additionally:
- You cannot delete yourself
- You cannot delete the last user with critical permissions (like
Manage Site,Manage Users, etc.) - The system ensures at least one admin remains with each critical permission
-
Navigate to the Users area from the dashboard
-
Click on the user you want to delete to open their details
-
Scroll down to the Danger zone and click on Delete user button
-
Confirm the deletion when prompted
The following business entities are transferred to the admin performing the deletion:
- Course Ownership: All courses created by the user
- Lesson Ownership: All lessons created by the user
- Page Ownership: All pages created by the user (course pages, blog pages, etc.)
- Community Ownership: All communities created by the user
- Community Posts: All posts created by the user in any community
- Community Comments: All comments made by the user
- Email Templates: All email templates created by the user
- Email Sequences: All email sequences (campaigns) created by the user
- Broadcasts: All email broadcasts created by the user
- Payment Plans: All payment plans created by the user
- User Themes: All custom themes created by the user
- User Segments: All user segments created by the user
The following personal data is permanently removed:
- User account and profile information
- User avatar and media files
- Authentication tokens and sessions
- Course enrollments and memberships
- Lesson progress and evaluations
- Download links generated for the user
- Activity logs and analytics data
- Notifications sent to the user
- Community membership records
- Community post subscriptions
- Community reports filed by the user
- Email delivery records
- Email event logs (opens, clicks, etc.)
- Ongoing email sequences for the user
- Mail request status records
- Invoices associated with the user
- Payment subscriptions (cancelled automatically)
- Certificates issued to the user
This deletion process is designed to comply with GDPR Article 17 (Right to Erasure). When a user is deleted:
- All personal data is permanently removed
- Business entities are preserved to maintain system integrity
- The operation is logged for audit purposes
- Payment subscriptions are automatically cancelled
CourseLit implements several safety measures to prevent accidental data loss:
- Permission Validation: Ensures at least one user retains each critical permission
- Self-Deletion Prevention: You cannot delete your own account
- Confirmation Required: Deletion requires explicit confirmation
- Atomic Operation: The entire deletion process succeeds or fails as a unit
After a user is deleted:
- All their business entities (courses, communities, etc.) continue to function normally under the new owner
- Students enrolled in their courses can continue learning
- Community members can continue participating
- Email sequences continue running for other users
- The deleted user cannot log in anymore
If the deleted user had active payment subscriptions:
- All subscriptions are automatically cancelled
- The payment provider (Stripe, PayPal, etc.) is notified
- No further charges will occur
- Refunds must be handled manually through your payment provider if needed
- Review Before Deletion: Check what content and entities the user owns before deleting
- Notify Stakeholders: If the user created important courses or communities, inform relevant team members
- Export Data First: If you need to retain any information for records, export it before deletion
- Handle Refunds: Process any necessary refunds through your payment provider before deletion
- Document the Action: Keep a record of why and when the user was deleted for compliance purposes
If you encounter an error when trying to delete a user:
- "Cannot delete last user with permission X": This user is the last one with a critical permission. Assign this permission to another user first.
- "Action not allowed": You don't have the
Manage Userspermission. - "User not found": The user may have already been deleted or doesn't exist.
If a subscription fails to cancel:
- Note the subscription ID from the error message
- Manually cancel the subscription in your payment provider's dashboard
- Try the deletion again
We are always here for you. Come chat with us in our Discord channel or send a tweet at @CourseLit.
