diff --git a/core/Command/UserCreateCommand.php b/core/Command/UserCreateCommand.php index 5715663..2248210 100644 --- a/core/Command/UserCreateCommand.php +++ b/core/Command/UserCreateCommand.php @@ -42,7 +42,13 @@ class UserCreateCommand extends Command $emailQuestion = new Question('E-mail: '); $emailQuestion->setValidator(function ($value) { - return !empty($value); + if (empty($value)) { + throw new \RuntimeException( + 'The email must not be empty.' + ); + } + + return $value; }); $passwordQuestion = new Question('Password (leave empty to generate a random password): ');