exp:expuserapprove
Available since Exponential 6.0.15 (in development, not in a release yet).
Summary
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)
Usage
./console exp:expuserapprove [options] php bin/php/expuserapprove.php [options] ./console exp:user:approve [options]
Aliases
exp:user:approve
Help
The output of ./console help exp:expuserapprove (the script run with --help), without the standard options:
Usage: bin/php/expuserapprove.php [OPTION]... [USER] 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 --apply Options: --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=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 |
|---|---|---|
| --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) |
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/expuserapprove.php, kernel/private/classes/commands/expuserapprove.php
See also
Generated example: exp:expuserapprove
Added to the reference for Exponential 6.0.15.
Contributors
- Graham Brookins Updated
Comments
Add a comment