summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorLaurens Post <lkpost@scept.re>2015-04-01 00:54:11 +0200
committerLaurens Post <lkpost@scept.re>2015-04-04 12:25:34 +0200
commit6ce790ebbc64b6951aece60ba63b231ae35652ff (patch)
tree18df23272386bceecc5ab86f758c8e1908a135a3 /core
parent691c353eeda077be0fcca1e3839265815a650a90 (diff)
downloadnextcloud-server-6ce790ebbc64b6951aece60ba63b231ae35652ff.tar.gz
nextcloud-server-6ce790ebbc64b6951aece60ba63b231ae35652ff.zip
Fix occ user:add failure return codes
Diffstat (limited to 'core')
-rw-r--r--core/command/user/add.php3
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')) {