summaryrefslogtreecommitdiffstats
path: root/apps/provisioning_api/lib
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-03-16 15:37:05 +0100
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-03-19 15:12:32 +0100
commit24659342f5e12903a252b50778179b1b558832ea (patch)
tree7e37fa8aa0ec72738d8caeec22c3e8c32e98a598 /apps/provisioning_api/lib
parent2493e9426db1528437c6055a54fdf0ed17914690 (diff)
downloadnextcloud-server-24659342f5e12903a252b50778179b1b558832ea.tar.gz
nextcloud-server-24659342f5e12903a252b50778179b1b558832ea.zip
fixup! Check if groups is array, return empty do not throw
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/provisioning_api/lib')
-rw-r--r--apps/provisioning_api/lib/Controller/UsersController.php9
1 files changed, 2 insertions, 7 deletions
diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php
index 1db4c96b752..c09f1617f40 100644
--- a/apps/provisioning_api/lib/Controller/UsersController.php
+++ b/apps/provisioning_api/lib/Controller/UsersController.php
@@ -340,7 +340,7 @@ class UsersController extends OCSController {
$data['storageLocation'] = $targetUserObject->getHome();
$data['lastLogin'] = $targetUserObject->getLastLogin() * 1000;
$data['backend'] = $targetUserObject->getBackendClassName();
- $data['subadmins'] = $this->getUserSubAdminGroupsData($targetUserObject->getUID());
+ $data['subadmin'] = $this->getUserSubAdminGroupsData($targetUserObject->getUID());
$data['quota'] = $this->fillStorageInfo($targetUserObject->getUID());
$data[AccountManager::PROPERTY_EMAIL] = $targetUserObject->getEMailAddress();
$data[AccountManager::PROPERTY_DISPLAYNAME] = $targetUserObject->getDisplayName();
@@ -852,12 +852,7 @@ class UsersController extends OCSController {
*/
public function getUserSubAdminGroups(string $userId): DataResponse {
$groups = $this->getUserSubAdminGroupsData($userId);
-
- if(is_array($groups)) {
- throw new OCSException('Unknown error occurred', 102);
- } else {
- return new DataResponse($groups);
- }
+ return new DataResponse($groups);
}
/**