Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/group
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-01-25 14:48:03 +0400
committerBjörn Schießle <schiessle@owncloud.com>2013-01-25 14:48:03 +0400
commit4271430e609be252d9b4a69fd7b3590571c14f7c (patch)
tree2c5c5bf9bf16e17a18488fcea6cc0f7f28e8aad2 /lib/group
parent9bb8e0583995fff244432bc34820127ef8ff6ac6 (diff)
get all display names from users in a given group
Diffstat (limited to 'lib/group')
-rw-r--r--lib/group/backend.php18
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;
+ }
}