exp:expuseredit
Change a user account: e-mail address, login, first and last name, groups added or removed, the main group (a dry run unless --apply).
Script bin/php/expuseredit.php, code in kernel/private/classes/commands/expuseredit.php. Run it from the installation root, as the user the web server runs as:
./console exp:expuseredit --help
./console exp:user:edit --help
php bin/php/expuseredit.php --helpHelp text
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=jsonOptions
| Option | Value | Help |
|---|---|---|
--email | 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) |
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/expuseredit.php, kernel/private/classes/commands/expuseredit.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.