exp:expuserdisable
Available since Exponential 6.0.15 (in development, not in a release yet).
Summary
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)
Usage
./console exp:expuserdisable [options] php bin/php/expuserdisable.php [options] ./console exp:user:disable [options]
Aliases
exp:user:disable
Help
The output of ./console help exp:expuserdisable (the script run with --help), without the standard options:
Usage: bin/php/expuserdisable.php [OPTION]... [USER] 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 --apply Options: --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=VALUE Act as this user (login, e-mail or id; default the user of [UserSettings] UserCreatorID); the audit records it as who did it --format=VALUE text (default) or json (the machine output exp-user/1)
Options
| Option | Value | Description |
|---|---|---|
| --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) |
Arguments
[user]
Standard options
Every script also takes the standard options of the script framework: --help, --quiet, --siteaccess, --debug, --colors, --no-colors, --logfiles, --no-logfiles, --verbose and --allow-root-user.
Source
bin/php/expuserdisable.php, kernel/private/classes/commands/expuserdisable.php
See also
Generated example: exp:expuserdisable
Added to the reference for Exponential 6.0.15.
Contributors
- Graham Brookins Updated
Comments
Add a comment