diff options
author | Björn Schießle <schiessle@owncloud.com> | 2013-01-25 11:48:03 +0100 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2013-01-25 11:48:03 +0100 |
commit | 4271430e609be252d9b4a69fd7b3590571c14f7c (patch) | |
tree | 2c5c5bf9bf16e17a18488fcea6cc0f7f28e8aad2 /lib/group/backend.php | |
parent | 9bb8e0583995fff244432bc34820127ef8ff6ac6 (diff) | |
download | nextcloud-server-4271430e609be252d9b4a69fd7b3590571c14f7c.tar.gz nextcloud-server-4271430e609be252d9b4a69fd7b3590571c14f7c.zip |
get all display names from users in a given group
Diffstat (limited to 'lib/group/backend.php')
-rw-r--r-- | lib/group/backend.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/group/backend.php b/lib/group/backend.php index 9ff432d0663..ceb2d9242dd 100644 --- a/lib/group/backend.php +++ b/lib/group/backend.php @@ -133,5 +133,23 @@ abstract class OC_Group_Backend implements OC_Group_Interface { public function usersInGroup($gid, $search = '', $limit = -1, $offset = 0) { return array(); } + + /**
+ * @brief get a list of all display names in a group
+ * @param string $gid
+ * @param string $search
+ * @param int $limit
+ * @param int $offset
+ * @return array with display names (key) and user ids (value)
+ */
+ public function DisplayNamesInGroup($gid, $search = '', $limit = -1, $offset = 0) {
+ $displayNames = '';
+ $users = $this->usersInGroup($gid, $search, $limit, $offset);
+ foreach ( $users as $user ) {
+ $DisplayNames[$user] = $user;
+ }
+
+ return $DisplayNames;
+ } } |