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

github.com/nextcloud/jsxc.nextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'build/lib/Controller/ExternalApiController.php')
-rw-r--r--build/lib/Controller/ExternalApiController.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/build/lib/Controller/ExternalApiController.php b/build/lib/Controller/ExternalApiController.php
index f93134b..342fdac 100644
--- a/build/lib/Controller/ExternalApiController.php
+++ b/build/lib/Controller/ExternalApiController.php
@@ -160,6 +160,12 @@ class ExternalApiController extends SignatureProtectedApiController
$userGroups = $this->groupManager->getUserGroups($currentUser);
foreach ($userGroups as $userGroup) {
+ if (method_exists($userGroup, 'getDisplayName')) {
+ $groupName = $userGroup->getDisplayName();
+ } else {
+ $groupName = $userGroup->getGID();
+ }
+
foreach ($userGroup->getUsers() as $user) {
$uidMember = $user->getUID();
@@ -170,7 +176,7 @@ class ExternalApiController extends SignatureProtectedApiController
];
}
- $roster[$uidMember]['groups'][] = $userGroup->getDisplayName();
+ $roster[$uidMember]['groups'][] = $groupName;
}
}