Skip to content

Commit dd12e94

Browse files
CarlSchwanbackportbot[bot]
authored andcommitted
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>
1 parent 5c52472 commit dd12e94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/private/User/Manager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ public function getSeenUsers(int $offset = 0): \Iterator {
845845
foreach ($userIds as $userId) {
846846
foreach ($this->backends as $backend) {
847847
if ($backend->userExists($userId)) {
848-
$user = $this->getUserObject($userId, $backend, false);
848+
$user = new LazyUser($userId, $this, null, $backend);
849849
yield $user;
850850
break;
851851
}

0 commit comments

Comments
 (0)