From 9bb8e0583995fff244432bc34820127ef8ff6ac6 Mon Sep 17 00:00:00 2001 From: Björn Schießle Date: Fri, 25 Jan 2013 11:05:00 +0100 Subject: get all display names --- lib/user/backend.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'lib/user') diff --git a/lib/user/backend.php b/lib/user/backend.php index 47c92f5fe7b..5823e390406 100644 --- a/lib/user/backend.php +++ b/lib/user/backend.php @@ -131,4 +131,19 @@ abstract class OC_User_Backend implements OC_User_Interface { public function getDisplayName($uid) { return $uid; } + + /** + * @brief Get a list of all display names + * @returns array with all displayNames and the correspondig uids + * + * Get a list of all display names. + */ + public function getDisplayNames($search = '', $limit = null, $offset = null) { + $displayNames = array(); + $users = $this->getUsers($search, $limit, $offset); + foreach ( $users as $user) { + $displayNames[$user] = $user; + } + return $displayNames; + } } -- cgit v1.2.3