diff options
author | Vinicius Coque <vinicius.coque@bluepex.com> | 2011-06-28 16:55:51 -0300 |
---|---|---|
committer | Vinicius Coque <vinicius.coque@bluepex.com> | 2011-06-28 16:55:51 -0300 |
commit | 4842755397c92f1c16b50b16e01b28768f8b43c1 (patch) | |
tree | 97f0dbf4361974041eccfd6bbf50d5c44836942d /etc/inc/auth.inc | |
parent | f0b17f3f7226f819c94dfab4c9abc0f3e4962152 (diff) | |
parent | 84924e76c44950387e387af7927f63d5822dfda4 (diff) | |
download | pfsense-4842755397c92f1c16b50b16e01b28768f8b43c1.zip pfsense-4842755397c92f1c16b50b16e01b28768f8b43c1.tar.gz |
Merge remote-tracking branch 'mainline/master' into inc
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 9d27da8..a7ec270 100644 --- a/etc/inc/auth.inc +++ b/etc/inc/auth.inc @@ -193,9 +193,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; } @@ -208,9 +210,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; } |