perf(users): Create lazy users in IUserManager::getSeenUsers

Particularly relevant in occ commands/background jobs like the trashbin
expiration which only needs the user ids and not the full information.

Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
This commit is contained in:
Carl Schwan 2025-09-03 15:24:02 +02:00 committed by backportbot[bot]
parent 5c524726d8
commit dd12e949e3

View file

@ -845,7 +845,7 @@ class Manager extends PublicEmitter implements IUserManager {
foreach ($userIds as $userId) {
foreach ($this->backends as $backend) {
if ($backend->userExists($userId)) {
$user = $this->getUserObject($userId, $backend, false);
$user = new LazyUser($userId, $this, null, $backend);
yield $user;
break;
}