exp:expuseredit
Available since Exponential 6.0.15 (in development, not in a release yet).
Summary
Change a user account: e-mail address, login, first and last name, groups added or removed, the main group (a dry run unless --apply)
Usage
./console exp:expuseredit [options] php bin/php/expuseredit.php [options] ./console exp:user:edit [options]
Aliases
exp:user:edit
Help
The output of ./console help exp:expuseredit (the script run with --help), without the standard options:
Usage: bin/php/expuseredit.php [OPTION]... [USER] Change a user account Changes the e-mail address and the login (checked as the administration checks them: valid, not another account's), the first and last name (a new version, published with its workflows), and the groups: --add-group adds a location in a group, --remove-group removes one (an account keeps at least one), --main-group chooses the main one. Without --apply nothing is changed. ./console exp:user:edit jane [email protected] --apply ./console exp:user:edit jane --add-group=Editors --remove-group=Members --main-group=Editors --apply ./console exp:user:edit 1234 --first-name=Janet --format=json Options: --email=VALUE The e-mail address (create: of the new account; edit: the new address) --login=VALUE The login name (create: of the new account; edit: the new login name) --first-name=VALUE The first name (the attribute first_name of the user class) --last-name=VALUE The last name (the attribute last_name of the user class) --add-group=VALUE... Add the account to this user group (node id or name; repeat for more) --remove-group=VALUE... Remove the account from this user group (node id or name; repeat for more); an account keeps at least one --main-group=VALUE Make this group (node id or name, one the account is or becomes a member of) its main group --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 |
|---|---|---|
| required | The e-mail address (create: of the new account; edit: the new address) | |
| --login | required | The login name (create: of the new account; edit: the new login name) |
| --first-name | required | The first name (the attribute first_name of the user class) |
| --last-name | required | The last name (the attribute last_name of the user class) |
| --add-group | required | Add the account to this user group (node id or name; repeat for more) |
| --remove-group | required | Remove the account from this user group (node id or name; repeat for more); an account keeps at least one |
| --main-group | required | Make this group (node id or name, one the account is or becomes a member of) its main group |
| --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/expuseredit.php, kernel/private/classes/commands/expuseredit.php
See also
Generated example: exp:expuseredit
Added to the reference for Exponential 6.0.15.
Contributors
- Graham Brookins Updated
Comments
Add a comment