exp:expuserapprove
Approve a waiting registration (activate the account, or accept its approval item and publish it), or reject it with --reject, as Users > Unactivated and the approval item do (a dry run unless --apply).
Script bin/php/expuserapprove.php, code in kernel/private/classes/commands/expuserapprove.php. Run it from the installation root, as the user the web server runs as:
./console exp:expuserapprove --help
./console exp:user:approve --help
php bin/php/expuserapprove.php --helpHelp text
Approve or reject a waiting registration
A registration waits for the person to confirm the e-mail address, for an administrator to activate
the account, or for an approval item (exp:user:pending lists them). Approving activates the account
as Users > Unactivated does (the registration then completes: publish, the welcome mail), or accepts
the approval item and continues its workflow at once. --reject denies the item and removes the
account for good, as the reject link of the registration mail does; an active account is never
removed here. Without --apply nothing is changed.
./console exp:user:approve jane --apply
./console exp:user:approve spam-account --reject --applyOptions
| Option | Value | Help |
|---|---|---|
--reject | Reject the registration instead: deny its approval and remove the account for good | |
--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/expuserapprove.php, kernel/private/classes/commands/expuserapprove.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.