Merge pull request 'username should be an argument of user:add' (!71) from bugfix/fix-user-creation-cli into develop
All checks were successful
mapguesser/pipeline/head This commit looks good
All checks were successful
mapguesser/pipeline/head This commit looks good
Reviewed-on: #71
This commit is contained in:
commit
49069f4a52
@ -14,6 +14,7 @@ class AddUserCommand extends Command
|
|||||||
$this->setName('user:add')
|
$this->setName('user:add')
|
||||||
->setDescription('Adding of user.')
|
->setDescription('Adding of user.')
|
||||||
->addArgument('email', InputArgument::REQUIRED, 'Email of user')
|
->addArgument('email', InputArgument::REQUIRED, 'Email of user')
|
||||||
|
->addArgument('username', InputArgument::REQUIRED, 'Username of user')
|
||||||
->addArgument('password', InputArgument::REQUIRED, 'Password of user')
|
->addArgument('password', InputArgument::REQUIRED, 'Password of user')
|
||||||
->addArgument('type', InputArgument::OPTIONAL, 'Type of user');;
|
->addArgument('type', InputArgument::OPTIONAL, 'Type of user');;
|
||||||
}
|
}
|
||||||
@ -22,6 +23,7 @@ class AddUserCommand extends Command
|
|||||||
{
|
{
|
||||||
$user = new User();
|
$user = new User();
|
||||||
$user->setEmail($input->getArgument('email'));
|
$user->setEmail($input->getArgument('email'));
|
||||||
|
$user->setUsername($input->getArgument('username'));
|
||||||
$user->setPlainPassword($input->getArgument('password'));
|
$user->setPlainPassword($input->getArgument('password'));
|
||||||
$user->setActive(true);
|
$user->setActive(true);
|
||||||
$user->setCreatedDate(new DateTime());
|
$user->setCreatedDate(new DateTime());
|
||||||
|
Loading…
Reference in New Issue
Block a user