diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-06-13 18:48:49 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2023-04-27 11:57:45 +0200 |
commit | 35dc2235001bf61f07c78b50e74ca029bb9fc05d (patch) | |
tree | b68b7d6e311caf9f7c3cc597e42c085fce792851 /apps/user_ldap/lib/Group_Proxy.php | |
parent | 5e96228eb1f7999a327dacab22055ec2aa8e28a3 (diff) | |
download | nextcloud-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 'apps/user_ldap/lib/Group_Proxy.php')
-rw-r--r-- | apps/user_ldap/lib/Group_Proxy.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/user_ldap/lib/Group_Proxy.php b/apps/user_ldap/lib/Group_Proxy.php index c8c986318ec..74655840f47 100644 --- a/apps/user_ldap/lib/Group_Proxy.php +++ b/apps/user_ldap/lib/Group_Proxy.php @@ -334,4 +334,8 @@ class Group_Proxy extends Proxy implements \OCP\GroupInterface, IGroupLDAP, IGet public function getBackendName(): string { return 'LDAP'; } + + public function searchInGroup(string $gid, string $search = '', int $limit = -1, int $offset = 0): array { + return $this->handleRequest($gid, 'searchInGroup', [$gid, $search, $limit, $offset]); + } } |