Open pfrenssen opened 8 years ago
Not having this is a real bother for migration where we frequently rollback the creation of groups but the memberships stick around. Is there any reason why this should not be implemented?
Should be implemented. Would love a PR down in https://github.com/Gizra/og :)
This was implemented in https://github.com/amitaibu/og/pull/179. If you want the memberships to be deleted immediately when the group is deleted, then set the deletion method to 'Simple' in /admin/config/group/settings
. If this is left on the default setting the orphans will be deleted in a batch process which might not be triggered if you do a migration rollback.
Of course it is also possible that there is a bug somewhere that is preventing the memberships from being deleted :)
Oh right, I completely forgot we had that in. Thanks!
This issue was about cleaning up memberships after deleting a group, but they also need to be cleaned up after deleting a user. PR for this in https://github.com/Gizra/og/pull/291
In PR #162 the group content is cleaned up when a group is deleted. We also need to clean up group memberships when this happens.
Ref
og_entity_predelete()