diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-04 16:34:40 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-04 16:34:40 +0200 |
commit | 8062b906b95d10efb6fe4160a7277e6a1ecc2941 (patch) | |
tree | 1144d1b8746e518072ae2b94675e6c6fc9b6cace | |
parent | 4996706078a901fa532b0fed0fb0bc264d1ba778 (diff) | |
parent | 6ce790ebbc64b6951aece60ba63b231ae35652ff (diff) | |
download | nextcloud-server-8062b906b95d10efb6fe4160a7277e6a1ecc2941.tar.gz nextcloud-server-8062b906b95d10efb6fe4160a7277e6a1ecc2941.zip |
Merge pull request #15403 from Crote/occ-user-add-return
Fix occ user:add failure return codes
-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')) { |