mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Correctly return no groups when the user is not a member of a local group.
This commit is contained in:
parent
b32a37912a
commit
9671bc5529
@ -68,6 +68,7 @@ function getAllowedGroups($logged_in_user) {
|
||||
$fdny = fopen("/tmp/groups","w");
|
||||
fwrite($fdny, print_r($allowed, true));
|
||||
fclose($fdny);
|
||||
$allowed = array();
|
||||
if(is_array($config['system']['group']) && is_array($allowed_groups)) {
|
||||
foreach($config['system']['group'] as $group) {
|
||||
if(in_array($group['name'], $allowed_groups)) {
|
||||
@ -77,8 +78,7 @@ function getAllowedGroups($logged_in_user) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if(count($allowed)>1)
|
||||
return $allowed;
|
||||
return $allowed;
|
||||
}
|
||||
|
||||
$final_allowed = array();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user