FOS\UserBundle\Command\ChangePasswordCommand::configure PHP Method

configure() protected method

See also: Command
protected configure ( )
    protected function configure()
    {
        $this->setName('fos:user:changePassword')->setDescription('Change the password of a user.')->setDefinition(array(new InputArgument('username', InputArgument::REQUIRED, 'The username'), new InputArgument('password', InputArgument::REQUIRED, 'The password')))->setHelp(<<<EOT
The <info>fos:user:changePassword</info> command changes the password of a user:

  <info>php app/console fos:user:changePassword matthieu</info>

This interactive shell will first ask you for a password.

You can alternatively specify the password as a second argument:

  <info>php app/console fos:user:changePassword matthieu mypassword</info>

EOT
);
    }

Usage Example

    protected function configure()
    {
        parent::configure();
        $definition = $this->getDefinition();
        $definition->addOption(new InputOption('user-system', null, InputOption::VALUE_REQUIRED, 'The user-system to use'));
        $this->setHelp(<<<EOT
The <info>fos:user:change-password</info> command changes the password of a user:

  <info>php app/console fos:user:change-password --user-system=acme_user matthieu</info>

This interactive shell will first ask you for a password.

You can alternatively specify the password as a second argument:

  <info>php app/console fos:user:change-password --user-system=acme_user matthieu mypassword</info>

EOT
);
    }
ChangePasswordCommand