Skip to content

Commit

Permalink
Fixes userGroup membership form xibosignage/xibo#1653
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterMis committed Oct 24, 2018
1 parent 9d7776a commit cd51f9f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Controller/UserGroup.php
Expand Up @@ -683,6 +683,7 @@ public function assignUser($groupId)
$this->getLog()->debug('Assign User for groupId %d', $groupId);

$group = $this->userGroupFactory->getById($groupId);
$group->load();

if (!$this->isEditable($group))
throw new AccessDeniedException();
Expand All @@ -699,6 +700,7 @@ public function assignUser($groupId)
throw new AccessDeniedException(__('Access Denied to User'));

$group->assignUser($user);
$group->save(['validate' => false]);
}

// Check to see if unassign has been provided.
Expand All @@ -714,9 +716,9 @@ public function assignUser($groupId)
throw new AccessDeniedException(__('Access Denied to User'));

$group->unassignUser($user);
$group->save(['validate' => false]);
}

$group->save(['validate' => false]);

// Return
$this->getState()->hydrate([
Expand Down

0 comments on commit cd51f9f

Please sign in to comment.