Commit 39fe8d83 authored by Ad Schellevis's avatar Ad Schellevis

fix config handling for auth.inc, https://github.com/opnsense/core/issues/1733

parent e5b04016
......@@ -566,7 +566,7 @@ function local_user_set_groups($user, $new_groups = null)
// continue if group is already in current list or the groupname is invalid
continue;
}
$group = & $config['system']['group'][$groupindex[$groupname]];
$group = &config_read_array('system', 'group', $groupindex[$groupname]);
$group['member'][] = $user['uid'];
$mod_groups[] = $group;
}
......@@ -579,7 +579,7 @@ function local_user_set_groups($user, $new_groups = null)
if (!isset($config['system']['group'][$groupindex[$groupname]])) {
continue;
}
$group = & $config['system']['group'][$groupindex[$groupname]];
$group = &config_read_array('system', 'group', $groupindex[$groupname]);
if (is_array($group['member'])) {
$index = array_search($user['uid'], $group['member']);
array_splice($group['member'], $index, 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment