Merge pull request #15403 from Crote/occ-user-add-return

Fix occ user:add failure return codes
This commit is contained in:
Thomas Müller 2015-04-04 16:34:40 +02:00
commit 8062b906b9
1 changed files with 2 additions and 1 deletions

View File

@ -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')) {