Correctly return no groups when the user is not a member of a local group.

This commit is contained in:
Scott Ullrich 2007-12-31 23:09:25 +00:00
parent b32a37912a
commit 9671bc5529

View File

@ -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();