Skip to content

Commit

Permalink
fixed doAuthCreateUserTask to include email address in arguments list
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcin Chwedziak committed Jul 6, 2012
1 parent 4300cde commit c362ce6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/task/doAuthCreateUserTask.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ protected function configure()
{
$this->addArguments(array(
new sfCommandArgument('username', sfCommandArgument::REQUIRED, 'The user name'),
new sfCommandArgument('email', sfCommandArgument::REQUIRED, 'The email address'),
new sfCommandArgument('password', sfCommandArgument::REQUIRED, 'The password'),
));

Expand All @@ -24,7 +25,7 @@ protected function configure()
$this->detailedDescription = <<<EOF
The [user:create] task creates a user:
[./symfony user:create davert password|INFO]
[./symfony user:create davert davert@example.com password|INFO]
EOF;
}

Expand All @@ -37,6 +38,7 @@ protected function execute($arguments = array(), $options = array())

$user = new User();
$user->setUsername($arguments['username']);
$user->setEmail($arguments['email']);
$user->setPassword($arguments['password']);
$user->setIsActive(true);
$user->save();
Expand Down

0 comments on commit c362ce6

Please sign in to comment.