mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
chore: Use iterator in ExpireTrash command
Signed-off-by: Louis Chemineau <louis@chmn.me>
This commit is contained in:
parent
b03ffab5f0
commit
9677cb86cb
1 changed files with 4 additions and 2 deletions
|
|
@ -64,10 +64,12 @@ class ExpireTrash extends Command {
|
|||
} else {
|
||||
$p = new ProgressBar($output);
|
||||
$p->start();
|
||||
$this->userManager->callForSeenUsers(function (IUser $user) use ($p): void {
|
||||
|
||||
$users = $this->userManager->getSeenUsers();
|
||||
foreach ($users as $user) {
|
||||
$p->advance();
|
||||
$this->expireTrashForUser($user);
|
||||
});
|
||||
}
|
||||
$p->finish();
|
||||
$output->writeln('');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue