[BUGFIX] Cleanup command: actually delete disabled unconfirmed users - #316
Merged
garbast merged 1 commit intoAug 19, 2026
Conversation
findInOutdatedTemporaryUsers() queries fe_users through the default restriction container, whose HiddenRestriction forces disable = 0. Accounts that never confirmed the double opt-in are disable = 1, so they were never matched and the command deleted nothing. resetRestrictions() did not fix this: it resets to a fresh DefaultRestrictionContainer, which re-adds the HiddenRestriction, so it was a no-op. Remove only the HiddenRestriction via getRestrictions()->removeByType(HiddenRestriction::class), keeping the DeletedRestriction (the command hard-deletes) and the time restrictions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #315 for the develop line.
findInOutdatedTemporaryUsers()queries fe_users through the default restriction container, whoseHiddenRestrictionforcesdisable = 0. Accounts that never confirmed the double opt-in aredisable = 1, so they were never matched and the command deleted nothing.The existing
resetRestrictions()call does not fix this: it resets to a freshDefaultRestrictionContainer, which re-adds theHiddenRestriction, so it is a no-op. This replaces it withgetRestrictions()->removeByType(HiddenRestriction::class), removing only theHiddenRestrictionand keeping theDeletedRestriction(the command hard-deletes) and the time restrictions.