diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2013-03-05 21:22:34 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2013-03-05 21:22:34 +0100 |
commit | 5da9223d1c61257cbccbc762e6a7c28bc06f110b (patch) | |
tree | 314269687b0075b491fd9643252715f66c70b574 /lib/group.php | |
parent | b08894ba7727f9bce8d0e41d76ad5d2ae4a3b7e3 (diff) | |
download | nextcloud-server-5da9223d1c61257cbccbc762e6a7c28bc06f110b.tar.gz nextcloud-server-5da9223d1c61257cbccbc762e6a7c28bc06f110b.zip |
make getDisplayNames optional feature for Group Backends, fall back to internal names
Diffstat (limited to 'lib/group.php')
-rw-r--r-- | lib/group.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/group.php b/lib/group.php index 88f0a2a032c..d1a830730b7 100644 --- a/lib/group.php +++ b/lib/group.php @@ -294,7 +294,13 @@ class OC_Group { public static function displayNamesInGroup($gid, $search = '', $limit = -1, $offset = 0) { $displayNames=array(); foreach(self::$_usedBackends as $backend) { - $displayNames = array_merge($backend->displayNamesInGroup($gid, $search, $limit, $offset), $displayNames); + if($backend->implementsActions(OC_GROUP_BACKEND_GET_DISPLAYNAME)) { + $displayNames = array_merge($backend->displayNamesInGroup($gid, $search, $limit, $offset), $displayNames); + } else { + $users = $backend->usersInGroup($gid, $search, $limit, $offset); + $names = array_combine($users, $users); + $displayNames = array_merge($names, $displayNames); + } } return $displayNames; } |