From 8d125bccd70f5fa3ba23283b56049b205ac1281d Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 22 Jul 2026 23:41:06 +0200 Subject: [PATCH] perf: don't preemptively determine the backend in getSeenUsers Signed-off-by: Robin Appelman --- lib/private/User/Manager.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/private/User/Manager.php b/lib/private/User/Manager.php index ec048a2d08a89..7fdbefea3f39a 100644 --- a/lib/private/User/Manager.php +++ b/lib/private/User/Manager.php @@ -852,13 +852,7 @@ public function getSeenUsers(int $offset = 0, ?int $limit = null): \Iterator { $offset += $batchSize; foreach ($userIds as $userId) { - foreach ($this->backends as $backend) { - if ($backend->userExists($userId)) { - $user = new LazyUser($userId, $this, null, $backend); - yield $userId => $user; - break; - } - } + yield $userId => $this->getExistingUser($userId); } } while (count($userIds) === $batchSize && $limit !== 0); }