diff options
author | jim-p <jimp@pfsense.org> | 2011-07-01 11:38:20 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-07-01 11:38:20 -0400 |
commit | 2488a7e73a1527445f23b97d30cde74d1bb74738 (patch) | |
tree | fc17367994edbe8b94232b864e85942ca73ec651 /etc/inc/auth.inc | |
parent | da70dc36adf11666d92ab109c564c76103a3ebac (diff) | |
parent | 0fcaf4f2723c7defa1f8cd13ac3ba63c73a9d77d (diff) | |
download | pfsense-2488a7e73a1527445f23b97d30cde74d1bb74738.zip pfsense-2488a7e73a1527445f23b97d30cde74d1bb74738.tar.gz |
Merge remote branch 'upstream/master'
Diffstat (limited to 'etc/inc/auth.inc')
-rw-r--r-- | etc/inc/auth.inc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc index 8dc0fe7..ae4a8f3 100644 --- a/etc/inc/auth.inc +++ b/etc/inc/auth.inc @@ -200,9 +200,11 @@ function & getUserEntry($name) { function & getUserEntryByUID($uid) { global $debug, $config; - foreach ($config['system']['user'] as & $user) - if ($user['uid'] == $uid) - return $user; + + if (is_array($config['system']['user'])) + foreach ($config['system']['user'] as & $user) + if ($user['uid'] == $uid) + return $user; return false; } @@ -215,9 +217,11 @@ function & getGroupEntry($name) { function & getGroupEntryByGID($gid) { global $debug, $config; - foreach ($config['system']['group'] as & $group) - if ($group['gid'] == $gid) - return $group; + + if (is_array($config['system']['group'])) + foreach ($config['system']['group'] as & $group) + if ($group['gid'] == $gid) + return $group; return false; } |