mirror of
https://github.com/nextcloud/server.git
synced 2026-06-14 19:20:35 -04:00
Merge pull request #15403 from Crote/occ-user-add-return
Fix occ user:add failure return codes
This commit is contained in:
commit
8062b906b9
1 changed files with 2 additions and 1 deletions
|
|
@ -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')) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue