FEATURE: Bulk suspend users and filter the admin users list by activation#41227
Merged
Conversation
pmusaraj
approved these changes
Jun 26, 2026
| def fetch_users(params:) | ||
| # this order clause ensures we retrieve the users in the same order as the | ||
| # IDs in the param. we do this to ensure the users are suspended in the same | ||
| # order as they're selected in the UI |
Contributor
There was a problem hiding this comment.
Just curious, is the order of selection important?
Member
Author
There was a problem hiding this comment.
Not for correctness — users are suspended independently, so the outcome is the same in any order. It only keeps the progress feed (the position/total we publish to /bulk-user-suspend) counting up in the same order they're selected in the UI rather than in PK order. Mirrors what User::BulkDestroy already does.
…tion Communities periodically get hit by waves of spam registrations. Because these accounts have not verified their email they cannot post, but staff still need to review them and decide whether to suspend or delete them. Until now the only way to surface them was a Data Explorer query, after which each account had to be actioned individually in the admin UI, which is tedious for large waves. This fills the gaps in that cleanup workflow: - Adds an activation filter (All / Activated / Not activated) to the Admin > Users > New tab so unverified accounts can be isolated in the UI. - Adds a bulk suspend action next to the existing bulk delete, plus a "Select all" / "Clear all" control so a whole page of accounts can be actioned at once. - Shows the suspend reason on the Suspended tab, mirroring the silenced tab. Already-suspended users are excluded from bulk suspension, and the penalty-reason columns are populated from a single batched query instead of one query per row.
a6797f1 to
210f38b
Compare
Contributor
|
This pull request has been mentioned on Discourse Meta. There might be relevant details there: https://meta.discourse.org/t/review-and-suspend-accounts-which-are-not-yet-activated/406639/1 |
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.
Already-suspended users are excluded from bulk suspension, and the penalty-reason columns are populated from a single batched query instead of one query per row.
SCREENSHOTS