summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2013-01-31 21:19:24 +0100
committerArthur Schiwon <blizzz@owncloud.com>2013-01-31 21:19:24 +0100
commita1dc24c9daef6f976adf2101fe104e8c5d7dc4b2 (patch)
tree052db9e5eca7c31ebaa8eef0db29577608c8ea3f /apps/user_ldap
parent5bf7791b4212c6dba2ce7289841c71f8177cfa3f (diff)
downloadnextcloud-server-a1dc24c9daef6f976adf2101fe104e8c5d7dc4b2.tar.gz
nextcloud-server-a1dc24c9daef6f976adf2101fe104e8c5d7dc4b2.zip
LDAP: implement getDisplayName and getDisplayNames also for UserProxy (multiple server support)
Diffstat (limited to 'apps/user_ldap')
-rw-r--r--apps/user_ldap/user_proxy.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/apps/user_ldap/user_proxy.php b/apps/user_ldap/user_proxy.php
index 47f901ddb51..5609f72ee6e 100644
--- a/apps/user_ldap/user_proxy.php
+++ b/apps/user_ldap/user_proxy.php
@@ -147,6 +147,33 @@ class User_Proxy extends lib\Proxy implements \OCP\UserInterface {
}
/**
+ * @brief get display name of the user
+ * @param $uid user ID of the user
+ * @return display name
+ */
+ public function getDisplayName($uid) {
+ return $this->handleRequest($uid, 'getDisplayName', array($uid));
+ }
+
+ /**
+ * @brief Get a list of all display names
+ * @returns array with all displayNames (value) and the correspondig uids (key)
+ *
+ * Get a list of all display names and user ids.
+ */
+ public function getDisplayNames($search = '', $limit = null, $offset = null) {
+ //we do it just as the /OC_User implementation: do not play around with limit and offset but ask all backends
+ $users = array();
+ foreach($this->backends as $backend) {
+ $backendUsers = $backend->getDisplayNames($search, $limit, $offset);
+ if (is_array($backendUsers)) {
+ $users = array_merge($users, $backendUsers);
+ }
+ }
+ return $users;
+ }
+
+ /**
* @brief delete a user
* @param $uid The username of the user to delete
* @returns true/false