username should be an argument of user:add
All checks were successful
mapguesser/pipeline/pr-develop This commit looks good

This commit is contained in:
Bence Pőcze 2023-09-25 20:44:34 +02:00
parent 467399c81b
commit f3c3aa69eb
Signed by: bence
GPG Key ID: DC5BD6E95A333E6D

View File

@ -14,6 +14,7 @@ class AddUserCommand extends Command
$this->setName('user:add')
->setDescription('Adding of user.')
->addArgument('email', InputArgument::REQUIRED, 'Email of user')
->addArgument('username', InputArgument::REQUIRED, 'Username of user')
->addArgument('password', InputArgument::REQUIRED, 'Password of user')
->addArgument('type', InputArgument::OPTIONAL, 'Type of user');;
}
@ -22,6 +23,7 @@ class AddUserCommand extends Command
{
$user = new User();
$user->setEmail($input->getArgument('email'));
$user->setUsername($input->getArgument('username'));
$user->setPlainPassword($input->getArgument('password'));
$user->setActive(true);
$user->setCreatedDate(new DateTime());