diff options
-rw-r--r-- | core/command/user/add.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/command/user/add.php b/core/command/user/add.php index 93257ea2e5a..1ae0ffbe2ad 100644 --- a/core/command/user/add.php +++ b/core/command/user/add.php @@ -81,7 +81,7 @@ class Add extends Command { $uid = $input->getArgument('uid'); if ($this->userManager->userExists($uid)) { $output->writeln('<error>The user "' . $uid . '" already exists.</error>'); - return; + return 1; } $password = $input->getOption('password'); @@ -103,6 +103,7 @@ class Add extends Command { $output->writeln('The user "' . $user->getUID() . '" was created successfully'); } else { $output->writeln('<error>An error occurred while creating the user</error>'); + return 1; } if ($input->getOption('display-name')) { |