aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/IGroup.php
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-06-13 18:48:49 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2023-04-27 11:57:45 +0200
commit35dc2235001bf61f07c78b50e74ca029bb9fc05d (patch)
treeb68b7d6e311caf9f7c3cc597e42c085fce792851 /lib/public/IGroup.php
parent5e96228eb1f7999a327dacab22055ec2aa8e28a3 (diff)
downloadnextcloud-server-35dc2235001bf61f07c78b50e74ca029bb9fc05d.tar.gz
nextcloud-server-35dc2235001bf61f07c78b50e74ca029bb9fc05d.zip
Optimize retrieving display name when searching for users in a group
This is recurrent scenario that we are searching for users and then for each users we fetch the displayName. This is inefficient, so instead try to do one query to fetch everything (e.g. Database backend) or use the already existing DisplayNameCache helper. Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'lib/public/IGroup.php')
-rw-r--r--lib/public/IGroup.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/public/IGroup.php b/lib/public/IGroup.php
index ba13359c472..ec26cc55b69 100644
--- a/lib/public/IGroup.php
+++ b/lib/public/IGroup.php
@@ -99,7 +99,7 @@ interface IGroup {
* @return \OCP\IUser[]
* @since 8.0.0
*/
- public function searchUsers($search, $limit = null, $offset = null);
+ public function searchUsers(string $search, ?int $limit = null, ?int $offset = null): array;
/**
* returns the number of users matching the search string