diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-03-16 15:32:36 +0100 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-03-16 15:32:36 +0100 |
commit | 2493e9426db1528437c6055a54fdf0ed17914690 (patch) | |
tree | 1a56d7aa5395b8072bad4e55e4defed547e80db9 /apps/provisioning_api | |
parent | f5137fef6c79509473ddbd0bc9ac1e4e9c6d840d (diff) | |
download | nextcloud-server-2493e9426db1528437c6055a54fdf0ed17914690.tar.gz nextcloud-server-2493e9426db1528437c6055a54fdf0ed17914690.zip |
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')
-rw-r--r-- | apps/provisioning_api/lib/Controller/UsersController.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index b4880c2f46b..1db4c96b752 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -853,10 +853,10 @@ class UsersController extends OCSController { public function getUserSubAdminGroups(string $userId): DataResponse { $groups = $this->getUserSubAdminGroupsData($userId); - if(!$groups) { + if(is_array($groups)) { throw new OCSException('Unknown error occurred', 102); } else { - return new DataResponse($groups);; + return new DataResponse($groups); } } |