exp:expuserdisable
Disable a user account and end its sessions, as Edit user settings does; refuses the protected accounts and the last administrator (a dry run unless --apply).
Script bin/php/expuserdisable.php, code in kernel/private/classes/commands/expuserdisable.php. Run it from the installation root, as the user the web server runs as:
./console exp:expuserdisable --help
./console exp:user:disable --help
php bin/php/expuserdisable.php --helpHelp text
Disable a user account
Disables the account through the setsettings operation of the user module, as Edit user settings
and Users > Hygiene do, and ends all its sessions: the person can no longer sign in, and nothing
of the account or its content is removed. exp:user:enable undoes it. Refused for the anonymous
user, the user of [UserSettings] UserCreatorID, the administrator account, the user who acts and
the last enabled administrator. Without --apply nothing is changed.
./console exp:user:disable jane
./console exp:user:disable jane --applyOptions
| Option | Value | Help |
|---|---|---|
--apply | Make the change; without it the command only lists what it would change (a dry run) | |
--dry-run | The default, kept for scripts that pass it: list what would change, change nothing | |
--as | required | Act as this user (login, e-mail or id; default the user of [UserSettings] UserCreatorID); the audit records it as who did it |
--format | required | text (default) or json (the machine output exp-user/1) |
Read from the option definitions in the code (startup(), getOptions(), options() or ezcConsoleOption). Every script also takes the standard options of the script framework (--help, --siteaccess, --debug, --quiet, --allow-root-user ...).
Arguments: [user].
Related
Generated by ./console exp:help:examples from bin/php/expuserdisable.php, kernel/private/classes/commands/expuserdisable.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.