diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2017-02-09 16:12:57 +0100 |
---|---|---|
committer | Bjoern Schiessle <bjoern@schiessle.org> | 2017-02-09 16:23:10 +0100 |
commit | 2ca8339d012773e3906244f7b039e5bd72920c5f (patch) | |
tree | ff2bc312aa408a82855778a7032d2717c0ce8cb2 /apps/provisioning_api/lib | |
parent | bf88060a98ce397768d4afa7935b80751e4533f8 (diff) | |
download | nextcloud-server-2ca8339d012773e3906244f7b039e5bd72920c5f.tar.gz nextcloud-server-2ca8339d012773e3906244f7b039e5bd72920c5f.zip |
add groups to user info output
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'apps/provisioning_api/lib')
-rw-r--r-- | apps/provisioning_api/lib/Controller/UsersController.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index 1e8a767b33a..766775dfdbe 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -252,6 +252,11 @@ class UsersController extends OCSController { } $userAccount = $this->accountManager->getUser($targetUserObject); + $groups = $this->groupManager->getUserGroups($targetUserObject); + $gids = []; + foreach ($groups as $group) { + $gids[] = $group->getDisplayName(); + } // Find the data $data['id'] = $targetUserObject->getUID(); @@ -262,6 +267,7 @@ class UsersController extends OCSController { $data['address'] = $userAccount[\OC\Accounts\AccountManager::PROPERTY_ADDRESS]['value']; $data['webpage'] = $userAccount[\OC\Accounts\AccountManager::PROPERTY_WEBSITE]['value']; $data['twitter'] = $userAccount[\OC\Accounts\AccountManager::PROPERTY_TWITTER]['value']; + $data['groups'] = $gids; return $data; } |