Skip to content

Commit 9677cb8

Browse files
committed
chore: Use iterator in ExpireTrash command
Signed-off-by: Louis Chemineau <louis@chmn.me>
1 parent b03ffab commit 9677cb8

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

apps/files_trashbin/lib/Command/ExpireTrash.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,12 @@ protected function execute(InputInterface $input, OutputInterface $output): int
6464
} else {
6565
$p = new ProgressBar($output);
6666
$p->start();
67-
$this->userManager->callForSeenUsers(function (IUser $user) use ($p): void {
67+
68+
$users = $this->userManager->getSeenUsers();
69+
foreach ($users as $user) {
6870
$p->advance();
6971
$this->expireTrashForUser($user);
70-
});
72+
}
7173
$p->finish();
7274
$output->writeln('');
7375
}

0 commit comments

Comments
 (0)