Skip to content

[BUGFIX] Cleanup command: actually delete disabled unconfirmed users - #316

Merged
garbast merged 1 commit into
evoWeb:developfrom
magicsunday:bugfix/cleanup-delete-disabled-unconfirmed-develop
Aug 19, 2026
Merged

[BUGFIX] Cleanup command: actually delete disabled unconfirmed users#316
garbast merged 1 commit into
evoWeb:developfrom
magicsunday:bugfix/cleanup-delete-disabled-unconfirmed-develop

Conversation

@magicsunday

Copy link
Copy Markdown
Contributor

Fixes #315 for the develop line.

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.

The existing resetRestrictions() call does not fix this: it resets to a fresh DefaultRestrictionContainer, which re-adds the HiddenRestriction, so it is a no-op. This replaces it with getRestrictions()->removeByType(HiddenRestriction::class), removing only the HiddenRestriction and keeping the DeletedRestriction (the command hard-deletes) and the time restrictions.

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.
@garbast
garbast merged commit 1c8096b into evoWeb:develop Aug 19, 2026
54 of 90 checks passed
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.

CleanupCommand never deletes unconfirmed users — resetRestrictions() fix (466c033) is a no-op

2 participants