christianwach / civicrm-wp-member-sync

CiviCRM WordPress Member Sync plugin keeps a WordPress user in sync with a CiviCRM membership by granting either a role or capabilities to a WordPress user who has that membership.
https://wordpress.org/plugins/civicrm-wp-member-sync/
GNU General Public License v2.0
17 stars 10 forks source link

When contact is deleted from Civi, not updating on WP #28

Closed simonjohnparker closed 4 years ago

simonjohnparker commented 5 years ago

Hi Christian,

Currently using this plugin with roles, rather than capabilities. When a Civi member is status New, Current, Pending or Grace they are put in a custom WP 'Member' role, and for all expired/cancelled Civi membership status they are demoted to 'Subscriber'.

I deleted a contact in CiviCRM (soft delete to the Trash, not permanent) and ran a manual sync. This person's access wasn't changed, they remained in the WP 'Member' role. Although their Civi membership is technically stilling Pending status, I expected that deleting the contact would overrule that setting and would at least move them to 'Subscriber' or possibly even remove that user from WP?

Could you clarify the behaviour I should expect this scenario? and, does it change with just moving a contact to the Trash vs permanent delete on the Civi side?

Thanks!

christianwach commented 5 years ago

@simonjohnparker Apologies for not responding to this issue directly -- I wasn't notified of its existence for some reason. Let's continue via email and I'll close the issue when we've come to a conclusion.

christianwach commented 4 years ago

Closing because this is solved via an update to CiviCRM Admin Utilities which introduces the CiviCRM Contact "Soft Delete" setting to override CiviCRM's default behaviour.

rbaugh commented 3 years ago

I am seeing this same issue on an install. Both this plugin ad CiviCRM Admin Utilities plugins are up to date.

I removed two Civi contacts, fully deleted, and the WP user is still there and has the same WP Role that would give them member access. I have the soft delete enabled on the admin utilities, just confirmed to be sure.

christianwach commented 3 years ago

@rbaugh This plugin would be overstepping its remit if it deleted WordPress Users - it therefore doesn't. Did you modify the Membership or do a Manual Sync before deleting the Contact?

Also, please open a fresh issue rather than commenting on a closed one.