user:create
Creates a new user directly from the CLI - useful for bootstrapping the first account on a fresh instance, or scripting test users, without going through the registration endpoint.
Both arguments are required: identifier is the user’s unique identifier (typically their email, depending on the instance’s configured unique identifier field) and must not already be in use, and password is the user’s plaintext password, which is hashed before being stored. On success, the command prints the new user’s UUID.
The command exits with a failure status if a user with the given identifier already exists; it does not update or merge into an existing account.
Help
php bin/console user:create --helpDescription: Creates a new user. Usage: user:create <identifier> <password> Arguments: identifier Identifier of the user, email, must be unique password Password of the user Options: -h, --help Display help for the given command. When no command is given display help for the list command --silent Do not output any message -q, --quiet Only errors are displayed. All other output is suppressed -V, --version Display this application version --ansi|--no-ansi Force (or disable --no-ansi) ANSI output -n, --no-interaction Do not ask any interactive question -e, --env=ENV The Environment name. [default: "prod"] --no-debug Switch off debug mode. --profile Enables profiling (requires debug). -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Example
php bin/console user:create command-test@localhost.dev 1234▄ ▄▀ ▀▄ Ember Nexus API ▀█▀ v0.1.31, production mode User Create ▶ Created user with email 'command-test@localhost.dev' successfully, UUID is 2348c6c0-ac64-40ac-9a66-7a47f89df52f.