diff --git a/lib/Command/Index.php b/lib/Command/Index.php index 11f83747..63c1aac0 100644 --- a/lib/Command/Index.php +++ b/lib/Command/Index.php @@ -29,7 +29,6 @@ use OCP\Files\IRootFolder; use OCP\IConfig; use OCP\IGroupManager; use OCP\IUser; -use OCP\IGroup; use OCP\IUserManager; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; @@ -215,12 +214,12 @@ class Index extends Command } } elseif ($gid = $this->opts->group) { if ($group = $this->groupManager->get($gid)) { - $this->output->writeln("Group {$gid} not found"); - } else { foreach ($group->getUsers() as $user) { $closure($user); - } - } + } + } else { + $this->output->writeln("Group {$gid} not found"); + } } else { $this->userManager->callForSeenUsers(static fn (IUser $user) => $closure($user)); }