-
Monish Deb authored
# Conflicts: # README.md # deletecmsuser.php # info.xml
5e7c9fff
README.md 845 B
Delete CMS User
Description
This CiviCRM extension automatically deletes the associated WordPress user when a CiviCRM contact is deleted. It prevents errors where contacts cannot be deleted due to existing CMS user accounts.
Installation
- Upload this extension to
wp-content/plugins/civicrm/civicrm/ext/
- In CiviCRM, go to Administer -> System Settings -> Extensions
- Click Refresh, then install "Delete CMS User."
How It Works
- When a CiviCRM contact is deleted, this extension finds the linked WordPress user.
- The WordPress user is deleted before deleting the contact.
- If the user had content (posts/pages), it is reassigned to an administrator.
Testing
- Create a WordPress user and link it to a CiviCRM contact.
- Delete the contact in CiviCRM.
- Verify that the WordPress user is also deleted.