diff options
Diffstat (limited to 'settings/Controller')
-rw-r--r-- | settings/Controller/UsersController.php | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/settings/Controller/UsersController.php b/settings/Controller/UsersController.php index 28b8d2648d9..43a38432499 100644 --- a/settings/Controller/UsersController.php +++ b/settings/Controller/UsersController.php @@ -346,13 +346,12 @@ class UsersController extends Controller { } if (empty($groups)) { - $groups = $this->groupManager->getSubAdmin()->getSubAdminsGroups($currentUser); - // New class returns IGroup[] so convert back - $gids = []; - foreach ($groups as $group) { - $gids[] = $group->getGID(); - } - $groups = $gids; + return new DataResponse( + array( + 'message' => $this->l10n->t('No valid group selected'), + ), + Http::STATUS_FORBIDDEN + ); } } @@ -380,7 +379,7 @@ class UsersController extends Controller { ); } - if($user instanceof User) { + if($user instanceof IUser) { if($groups !== null) { foreach($groups as $groupName) { $group = $this->groupManager->get($groupName); |