Fix group condition

Signed-off-by: Akhil <akhil@e.email>
pull/803/head
Akhil 2023-09-01 20:23:24 +05:30
parent 16f12ef061
commit d08778122b
No known key found for this signature in database
GPG Key ID: A8AB680DBB7F3D45
1 changed files with 4 additions and 5 deletions

View File

@ -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("<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));
}