Skip to content

Commit

Permalink
Fix group condition
Browse files Browse the repository at this point in the history
Signed-off-by: Akhil <[email protected]>
  • Loading branch information
akhil1508 committed Sep 1, 2023
1 parent 16f12ef commit d087781
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/Command/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
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;
Expand Down Expand Up @@ -215,12 +214,12 @@ private function runForUsers($closure)
}
} elseif ($gid = $this->opts->group) {
if ($group = $this->groupManager->get($gid)) {
$this->output->writeln("<error>Group {$gid} not found</error>");
} else {
foreach ($group->getUsers() as $user) {
$closure($user);
}
}
}
} else {
$this->output->writeln("<error>Group {$gid} not found</error>");
}
} else {
$this->userManager->callForSeenUsers(static fn (IUser $user) => $closure($user));
}
Expand Down

0 comments on commit d087781

Please sign in to comment.