-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
[FIX] Subscriptions not removed when removing user #9432
Conversation
Bypass the cache and find the subscriptions directly from database to prevent the in memory changes while deleting. The for each of the array in memory does not works cuz the array is changing the size.
@rodrigok what do you think about a migration which removes inconsistent subscriptions? While the fix prevents new issues, the obsolete subscriptions are aasige problem in existing installations. |
@mrsimpson Sure, but I don't think it should be a migration, I'll see how we could create and admin option to run the consistency fix, so I'll merge this now. Thanks |
Once this is pushed into stable builds will this fix the existing problems for people affected by this bug? |
This will only keep the problem from effecting new cases, does not fix the ones that have already had this happen |
@geekgonecrazy Hi. It seems I have that problem with some users. Is there a fix for existing cases? |
you could likely write a mongo query to do something like:
Then from there you could loop over if your problem is instead that you have subscriptions hanging around in your channel list for users that are no more... you could use same loop. Instead take |
@geekgonecrazy thank you for your reply, but this query finds 0 entrys. Maybe my problem is different to the one in this thread? |
Did user1 at any point delete their user and then create an account with the exact same username? |
Yes. the User was deleted and recreated once iirc. |
Bypass the cache and find the subscriptions directly from database to prevent the in memory changes while deleting.
The for each of the array in memory does not works cuz the array is changing the size.
@RocketChat/core
Closes #6535