Skip to content
Snippets Groups Projects
Commit 8354e328 authored by Tim Steiner's avatar Tim Steiner
Browse files

Fix a bug in user admin when removing all of a user's parent groups.

parent a12b01cb
Branches
Tags
No related merge requests found
......@@ -71,7 +71,6 @@ class Auth_UserAdminController extends App_Controller_Action
public function editUserPostAction()
{
$in = $this->_getAllParams();
print_r($in);
$user = Auth_UserModel::find($in['id']);
if (!$user) {
......
......@@ -419,6 +419,9 @@ class Auth_GroupModel extends Unl_Model
}
foreach ($groupMap as $childGroupId => $targetParentGroups) {
if (!$targetParentGroups) {
$targetParentGroups = new Unl_Model_Collection(__CLASS__);
}
$currentParentGroups = $childGroupParentGroups[$childGroupId];
foreach ($currentParentGroups as $currentParentGroup) {
if (!in_array($currentParentGroup->getId(), $targetParentGroups->getId())) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment