Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pending and Blocked users are not removed on user delete. #740

Conversation

onesixromcom
Copy link

@onesixromcom onesixromcom commented May 3, 2022

STR:

  1. add member
  2. block member
  3. delete user
    RESULS: blocked/pending user still exist in table og_membership

The issue is in og_get_entity_groups() function which default parameter $state is OG_STATE_ACTIVE.

To fix all stalled blocked/pending users from database this script can be used:
to check what should be deleted:
select * from og_membership as om left join users as u ON u.uid = om.etid where (om.state=2 OR om.state=3) AND u.uid IS NULL;

to delete:
delete om from og_membership as om left join users as u ON u.uid = om.etid where (om.state=2 OR om.state=3) AND u.uid IS NULL;

@MPParsley MPParsley merged commit 12f7661 into Gizra:7.x-2.x May 3, 2022
@MPParsley MPParsley added this to the 1.0-alpha8 milestone May 3, 2022
@MPParsley
Copy link
Collaborator

Thanks

@MPParsley MPParsley modified the milestones: 1.0-alpha8, 1.0-alpha9 Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants