exp:expuser2fa
Two-step sign-in and passkeys of an account: show them; reset the second step for someone who lost the phone, remove the passkeys of a lost device (changes are a dry run unless --apply).
Script bin/php/expuser2fa.php, code in kernel/private/classes/commands/expuser2fa.php. Run it from the installation root, as the user the web server runs as:
./console exp:expuser2fa --help
./console exp:user:2fa --help
php bin/php/expuser2fa.php --helpHelp text
Two-step sign-in and passkeys of an account
Shows whether the account has a second sign-in step (its method) and how many passkeys. --reset
removes the second step, for someone who lost the phone, and resets the failed sign-ins; where
two-step sign-in is enforced, the next sign-in asks for a new setup. It needs the two-step
sign-in extension (sevenx_authentication_2fa). --remove-passkeys removes every passkey of the
account, as an administrator does for a lost or stolen device. The audit records
access.user.two_factor.remove and access.passkey.revoke. Without --apply nothing is changed.
./console exp:user:2fa jane
./console exp:user:2fa jane --reset --apply
./console exp:user:2fa jane --remove-passkeys --applyOptions
| Option | Value | Help |
|---|---|---|
--reset | Remove the second sign-in step (a lost phone) and reset the failed sign-ins; with enforced two-step sign-in the next sign-in asks for a new setup | |
--remove-passkeys | Remove every passkey of the account (a lost or stolen device) | |
--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/expuser2fa.php, kernel/private/classes/commands/expuser2fa.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.