Merge pull request 'check the user type if it has valid value' (#40) from bugfix/cli-user-creation-crashes-when-no-type-is-given into develop
Reviewed-on: https://gitea.e5tv.hu/esoko/mapguesser/pulls/40 Reviewed-by: Pőcze Bence <bence@pocze.ch>
This commit is contained in:
commit
d57a4c63e0
@ -27,7 +27,7 @@ class AddUserCommand extends Command
|
|||||||
$user->setActive(true);
|
$user->setActive(true);
|
||||||
$user->setCreatedDate(new DateTime());
|
$user->setCreatedDate(new DateTime());
|
||||||
|
|
||||||
if ($input->hasArgument('type')) {
|
if ($input->hasArgument('type') && $input->getArgument('type') !== null) {
|
||||||
$user->setType($input->getArgument('type'));
|
$user->setType($input->getArgument('type'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user