Neos\Neos\Command\UserCommandController::setPasswordCommand PHP Method

setPasswordCommand() public method

This command sets a new password for an existing user. More specifically, all accounts related to the user which are based on a username / password token will receive the new password. If an authentication provider was specified, the user will be determined by an account identified by "username" related to the given provider.
public setPasswordCommand ( string $username, string $password, string $authenticationProvider = null ) : void
$username string Username of the user to modify
$password string The new password
$authenticationProvider string Name of the authentication provider to use for finding the user. Example: "Typo3BackendProvider"
return void
    public function setPasswordCommand($username, $password, $authenticationProvider = null)
    {
        $user = $this->getUserOrFail($username, $authenticationProvider);
        $this->userService->setUserPassword($user, $password);
        $this->outputLine('The new password for user "%s" was set.', array($username));
    }