Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion core/Command/Group/ListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use OC\Core\Command\Base;
use OCP\IGroup;
use OCP\IGroupManager;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
Expand All @@ -23,6 +24,12 @@ protected function configure() {
$this
->setName('group:list')
->setDescription('list configured groups')
->addArgument(
'groupid',
InputArgument::OPTIONAL,
'Group id to show only the members of that group',
''
)
->addOption(
'limit',
'l',
Expand Down Expand Up @@ -50,7 +57,7 @@ protected function configure() {
}

protected function execute(InputInterface $input, OutputInterface $output): int {
$groups = $this->groupManager->search('', (int)$input->getOption('limit'), (int)$input->getOption('offset'));
$groups = $this->groupManager->search((string)$input->getArgument('groupid'), (int)$input->getOption('limit'), (int)$input->getOption('offset'));
$this->writeArrayInOutputFormat($input, $output, $this->formatGroups($groups, (bool)$input->getOption('info')));
return 0;
}
Expand Down