diff options
Diffstat (limited to 'core/Command/User/Add.php')
-rw-r--r-- | core/Command/User/Add.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/Command/User/Add.php b/core/Command/User/Add.php index 208fb1dceb5..bb11a1ea5c9 100644 --- a/core/Command/User/Add.php +++ b/core/Command/User/Add.php @@ -3,6 +3,7 @@ * @copyright Copyright (c) 2016, ownCloud, Inc. * * @author Arthur Schiwon <blizzz@arthur-schiwon.de> + * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Joas Schilling <coding@schilljs.com> * @author Laurens Post <lkpost@scept.re> * @author Roeland Jago Douma <roeland@famdouma.nl> @@ -22,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Core\Command\User; use OC\Files\Filesystem; @@ -84,7 +84,7 @@ class Add extends Command { ); } - protected function execute(InputInterface $input, OutputInterface $output) { + protected function execute(InputInterface $input, OutputInterface $output): int { $uid = $input->getArgument('uid'); if ($this->userManager->userExists($uid)) { $output->writeln('<error>The user "' . $uid . '" already exists.</error>'); @@ -154,14 +154,15 @@ class Add extends Command { if (!$group) { $this->groupManager->createGroup($groupName); $group = $this->groupManager->get($groupName); - if($group instanceof IGroup) { + if ($group instanceof IGroup) { $output->writeln('Created group "' . $group->getGID() . '"'); } } - if($group instanceof IGroup) { + if ($group instanceof IGroup) { $group->addUser($user); $output->writeln('User "' . $user->getUID() . '" added to group "' . $group->getGID() . '"'); } } + return 0; } } |