From 9671bc55295066974f013b1b2e71e46f9be012ec Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Mon, 31 Dec 2007 23:09:25 +0000 Subject: [PATCH] Correctly return no groups when the user is not a member of a local group. --- etc/inc/auth.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc index 8f66098f06..eeb0aef34b 100644 --- a/etc/inc/auth.inc +++ b/etc/inc/auth.inc @@ -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();