User Freeze
User Freeze blocks a set of Drupal accounts temporarily and later reactivates exactly those accounts, from Drush or the People list, leaving accounts that were already blocked untouched.
Blocking accounts in Drupal is easy. Unblocking only the right ones afterwards is not: once accounts are blocked, nothing distinguishes the ones you blocked for a content freeze from the ones an administrator blocked for good, so a bulk unblock reactivates everyone. User Freeze solves this with a small addition to the account: a Frozen since field that is set only while an account is frozen. Freezing blocks the account in the ordinary way and sets the field. Unfreezing reactivates the accounts that carry the field and clears it. Every other blocked account is left alone.
The module has two faces that share one set of rules: bulk actions on the People list, for freezing or unfreezing the accounts you tick, and Drush commands, for freezing or unfreezing by role with a full report before anything changes.
Features
Rules that apply everywhere
- Only active accounts are frozen. An account that is already blocked is never changed or marked.
- Only frozen accounts are unfrozen. An account blocked by any other means stays blocked, whatever you select.
- Administrators are never frozen. Accounts holding the administrator role chosen at People › Role settings are left alone whatever other roles they hold, as is user 1.
- Reactivating an account any other way clears the mark. Unblock it from the People list or the account form and it is simply active again.
- Optional emails. Notify accounts when they are frozen or unfrozen, with subject and body edited alongside core's other account emails. Off by default.
- Visible in Views. Frozen since can be added to any view of users as a field, a filter or a sort, so a list of frozen accounts, or of the accounts from one particular freeze, is a view away.
- Safe to keep installed. The module refuses to uninstall while any account is frozen, because the field it would remove is the only record of which accounts to reactivate.
People list: Views Bulk Operations or core's bulk form
- Two actions, Freeze the selected user(s) and Unfreeze the selected user(s), work on whatever rows you tick. Selecting a single row is how you unfreeze one account.
- The result is grouped, not one line per account: how many were frozen, how many were already frozen, how many were already blocked and could not be frozen, how many were protected. Under Views Bulk Operations the totals span the whole selection, even across its batches.
- Views Bulk Operations' confirmation step can be switched on for these actions, so a selection is reviewed before it is frozen or unfrozen.
Drush: freeze and unfreeze by role
drush user_freeze:freeze editor,approver(aliasesfreeze,uf-f) considers every account holding either role and freezes the active ones.drush freeze authenticatedconsiders every account on the site. The role argument is required, so freezing everyone is always a deliberate choice.drush user_freeze:unfreeze editor(aliasesunfreeze,uf-uf) reactivates the frozen accounts that hold the role. With no role it reactivates every frozen account.drush user_freeze:status(aliasuf-s) shows how many accounts are frozen right now, by role.- Nothing changes before you have seen the report. Every run first prints a table of roles by outcome, a sentence per outcome, and whether notification emails will go out, then asks for confirmation.
-yanswers yes for scripts and run sheets;--dry-runstops after the report. - The table's rows are the roles you named, or every role when you named none or
authenticated, in the order of the roles administration page. When accounts hold more than one listed role, a note explains why the rows add up to more than the total.
Typical uses: keeping editors out during a deployment or a content migration and letting them back in afterwards; suspending one group of accounts for a period; any situation where "block these now, restore exactly these later" is the requirement.
Post-Installation
The module works as soon as it is enabled. Four things are worth a look:
- Administrator role. Accounts holding the role selected at People › Role settings (
/admin/people/role-settings) are never frozen. Make sure that setting points at the role your administrators hold. - Emails. Nothing is sent by default. To notify accounts, go to Configuration › People › Account settings (
/admin/config/people/accounts), open Account frozen or Account unfrozen among the email settings, tick the notify box, and edit the text. The same tokens as core's account emails are available. - People list. Core's bulk form offers the two actions automatically. If your People view uses Views Bulk Operations with a fixed action list, add Freeze the selected user(s) and Unfreeze the selected user(s) to it, and consider enabling its confirmation step for both.
- Views. Add Frozen since to the People view, or to any view of users, to see who is frozen and since when.
To see which role machine names to use on the command line, run drush role:list --fields=rid,label.
Additional Requirements
Drupal 10.3 or later. Drush 12 or later for the commands; the People list actions work without Drush.
Recommended modules/libraries
Views Bulk Operations if you want the freeze and unfreeze actions with a confirmation step, selection across pages, and batch processing on large People lists. The actions work with core's bulk form as well.
Similar projects
Core already provides account blocking, both as the Block the selected user(s) action on the People list and as Drush's user:block command. What core does not do is remember which accounts a particular blocking operation touched, so reversing it means reactivating every blocked account or picking them out by hand. User Freeze adds only that memory and the tooling around it; it does not replace core's blocking for accounts that should stay blocked.
Supporting this Module
Bug reports, feature requests and merge requests are welcome in the issue queue.
Community Documentation
Usage details are in the module's README.
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Releases
| Version | Type | Core | Notes | Release date | |
|---|---|---|---|---|---|
| 1.0.0-beta1 | Pre-release | 10–11 | Sep 16, 2026 |