aboutsummaryrefslogtreecommitdiffstats
path: root/core/Command/User/Enable.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-06-26 14:54:51 +0200
committerJoas Schilling <coding@schilljs.com>2020-06-26 14:54:51 +0200
commitab21d69903c4360cbce59741624b6e765e3bd35f (patch)
tree8bed2d6af0d4bfef3766e356acc570b93eb9feb3 /core/Command/User/Enable.php
parented4afa55c1ccaef140ac310258ad837bf6af9557 (diff)
downloadnextcloud-server-ab21d69903c4360cbce59741624b6e765e3bd35f.tar.gz
nextcloud-server-ab21d69903c4360cbce59741624b6e765e3bd35f.zip
Add return value to all commands
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'core/Command/User/Enable.php')
-rw-r--r--core/Command/User/Enable.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/Command/User/Enable.php b/core/Command/User/Enable.php
index 5792ba9b752..c62eee87012 100644
--- a/core/Command/User/Enable.php
+++ b/core/Command/User/Enable.php
@@ -52,14 +52,15 @@ class Enable extends Command {
);
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$user = $this->userManager->get($input->getArgument('uid'));
if (is_null($user)) {
$output->writeln('<error>User does not exist</error>');
- return;
+ return 1;
}
$user->setEnabled(true);
$output->writeln('<info>The specified user is enabled</info>');
+ return 0;
}
}