Skip to content
Snippets Groups Projects

CMS User Delete

This extension deletes the associated CMS user when permanently deleting a CiviCRM contact. The normal behaviour without this extension is that Contacts cannot be deleted if they are linked to a CMS user.

This may be useful for deleting spam registrations or test users, but deploy with caution.

CMS content owned by the user being deleted can be reassigned to a new owner. If a new owner is not specified, the content will be deleted.

This is an extension for CiviCRM, licensed under AGPL-3.0.

Getting Started

When activated, an admin user is selected as the default 'reassign user'. Go to Administer > System Settings > CMS User Delete to change this. The default can be cleared, meaning that content is deleted instead of being reassigned.

Note

There are other reasons why a contact cannot be deleted, including having associated contributions. This extension addresses the situation where the only reason a contact cannot be deleted is the associated CMS user.

Known Issues

Current version only works with WordPress. Patch welcome for other CMSes. Untested code suggestions are included.

Contacts with CMS users cannot be soft-deleted, only permanently deleted.

This refers to 'Contacts' but only deletes of 'Individuals' are affected.