aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Group
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-03-02 15:21:35 +0100
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-03-08 17:13:49 +0100
commit00122fa02704c2e7dc02fde172472167cf3ad42b (patch)
treedb0e8bbc472a41bd3cbaba68d8054f57b7b63aca /lib/private/Group
parentcb2fbdd214ddda422fb7a57f5779ca450b6a0411 (diff)
downloadnextcloud-server-00122fa02704c2e7dc02fde172472167cf3ad42b.tar.gz
nextcloud-server-00122fa02704c2e7dc02fde172472167cf3ad42b.zip
Use group displayNames in users list
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'lib/private/Group')
-rw-r--r--lib/private/Group/Manager.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/private/Group/Manager.php b/lib/private/Group/Manager.php
index 2d40b447996..1dd951a1078 100644
--- a/lib/private/Group/Manager.php
+++ b/lib/private/Group/Manager.php
@@ -330,6 +330,17 @@ class Manager extends PublicEmitter implements IGroupManager {
}
/**
+ * get an array of groupid and displayName for a user
+ * @param IUser $user
+ * @return array ['displayName' => displayname]
+ */
+ public function getUserGroupNames(IUser $user) {
+ return array_map(function($group) {
+ return array('displayName' => $group->getDisplayName());
+ }, $this->getUserGroups($user));
+ }
+
+ /**
* get a list of all display names in a group
* @param string $gid
* @param string $search