Make sure primary group is in group list

Fixes Default group always added if primary group is not Default
This commit is contained in:
Nathan Gray 2014-05-05 14:46:01 +00:00
parent 098de471cd
commit 8dfea11106

View File

@ -154,6 +154,11 @@ class admin_account
break;
}
}
// Make sure primary group is in account groups
if($account['account_primary_group'] && !array_search($account['account_primary_group'], $account['account_groups']))
{
$account['account_groups'][] = $account['account_primary_group'];
}
$cmd = new admin_cmd_edit_user((int)$content['account_id'], $account);
$cmd->run();