exp:expuserchecklogin
Check whether a password read from standard input signs an account in (right password, enabled, not locked), for scripts and health checks; never counts as a failed sign-in.
Script bin/php/expuserchecklogin.php, code in kernel/private/classes/commands/expuserchecklogin.php. Run it from the installation root, as the user the web server runs as:
./console exp:expuserchecklogin --help
./console exp:user:check-login --help
php bin/php/expuserchecklogin.php --helpHelp text
Check a sign-in
Reads a password from standard input (--password-stdin, never from the command line) and says
whether it signs the account in: the right password, the account enabled and not locked. Exit 0
when it does, 1 when not, with the reason (wrong_password, disabled, locked, no_object). The check
does not sign in, opens no session, never counts as a failed sign-in and never prints the
password. Made for scripts and health checks of service accounts; a second sign-in step is not
checked.
./console exp:user:check-login ci-bot --password-stdin < /root/secrets/ci-bot-password
printf '%s\n' "$PASSWORD" | ./console exp:user:check-login ci-bot --password-stdin --format=jsonOptions
| Option | Value | Help |
|---|---|---|
--password-stdin | Read the password from standard input (one line), never from the command line (create and reset-password: it must pass the password rules) | |
--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/expuserchecklogin.php, kernel/private/classes/commands/expuserchecklogin.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.