diff options
author | Joas Schilling <coding@schilljs.com> | 2017-04-24 10:15:03 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2017-04-24 10:15:03 +0200 |
commit | e19126425bd24ab0a357bd6eb2673512b49dfef6 (patch) | |
tree | 10ddec104364749882f9584561fae5230c7be122 /apps/provisioning_api/lib | |
parent | 992c48c89bd71971a3821143aeac7dcb8f616461 (diff) | |
download | nextcloud-server-e19126425bd24ab0a357bd6eb2673512b49dfef6.tar.gz nextcloud-server-e19126425bd24ab0a357bd6eb2673512b49dfef6.zip |
Fix similar issues with the group id
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/provisioning_api/lib')
-rw-r--r-- | apps/provisioning_api/lib/Controller/UsersController.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index 088b0e6bdb0..ca78297a1a6 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -668,10 +668,10 @@ class UsersController extends OCSController { } // Check if group exists if($group === null) { - throw new OCSException('Group:'.$groupid.' does not exist', 102); + throw new OCSException('Group does not exist', 102); } // Check if trying to make subadmin of admin group - if(strtolower($groupid) === 'admin') { + if($group->getGID() === 'admin') { throw new OCSException('Cannot create subadmins for admin group', 103); } @@ -713,7 +713,7 @@ class UsersController extends OCSController { throw new OCSException('Group does not exist', 101); } // Check if they are a subadmin of this said group - if(!$subAdminManager->isSubAdminofGroup($user, $group)) { + if(!$subAdminManager->isSubAdminOfGroup($user, $group)) { throw new OCSException('User is not a subadmin of this group', 102); } |