Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

exp:expuserresetpassword

Reset a user's password: send the 'reset your password' link, set a generated password shown once, or one read from standard input; optionally require a new password at the next sign-in (a dry run unless --apply).

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/examples/commands/expuserresetpassword.md

On this page

exp:expuserresetpassword

Reset a user's password: send the "reset your password" link, set a generated password shown once, or one read from standard input; optionally require a new password at the next sign-in (a dry run unless --apply).

Script bin/php/expuserresetpassword.php, code in kernel/private/classes/commands/expuserresetpassword.php. Run it from the installation root, as the user the web server runs as:

./console exp:expuserresetpassword --help
./console exp:user:reset-password --help
php bin/php/expuserresetpassword.php --help

Help text

Reset a user's password
Choose one way: --send-link sends the mail of "Forgot password" with its one-time link (the
password stays until the person uses the link); --generate sets a generated password that passes
the password rules and prints it once; --password-stdin sets the password read from standard input
(never from the command line). --generate and --password-stdin end the account's sessions;
--require-change makes the person choose a new password at the next sign-in. The password is
never written to a log or the audit. In demo mode an administrator's password is never changed.
Without --apply nothing is changed and no mail is sent.

./console exp:user:reset-password jane --send-link --apply
./console exp:user:reset-password jane --generate --require-change --apply
./console exp:user:reset-password ci-bot --password-stdin --apply < secret-file

Options

OptionValueHelp
--send-linkSend the "reset your password" mail with its one-time link (the password stays until the link is used)
--generateSet a generated password that passes the password rules, print it once and end the account's sessions
--password-stdinRead the password from standard input (one line), never from the command line (create and reset-password: it must pass the password rules)
--require-changeThe account must choose a new password at its next sign-in
--applyMake the change; without it the command only lists what it would change (a dry run)
--dry-runThe default, kept for scripts that pass it: list what would change, change nothing
--asrequiredAct as this user (login, e-mail or id; default the user of [UserSettings] UserCreatorID); the audit records it as who did it
--formatrequiredtext (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].


Generated by ./console exp:help:examples from bin/php/expuserresetpassword.php, kernel/private/classes/commands/expuserresetpassword.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x