diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-01-29 23:00:55 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-01-29 23:00:55 +0000 |
commit | 58664cc9fbc39de8273c90ea88330741d1c0eb95 (patch) | |
tree | e7c94c1671597188c631d9dde91b0ca2f3d48a28 /usr/local/www | |
parent | 2b4468d4e3950e34959619cfdd8585c4a40626cc (diff) | |
download | pfsense-58664cc9fbc39de8273c90ea88330741d1c0eb95.zip pfsense-58664cc9fbc39de8273c90ea88330741d1c0eb95.tar.gz |
Only iterate groups if it is an array.
Diffstat (limited to 'usr/local/www')
-rw-r--r-- | usr/local/www/system_usermanager.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr/local/www/system_usermanager.php b/usr/local/www/system_usermanager.php index 73e0a85..8bf996a 100644 --- a/usr/local/www/system_usermanager.php +++ b/usr/local/www/system_usermanager.php @@ -109,10 +109,12 @@ if (isSystemAdmin($HTTP_SERVER_VARS['AUTH_USER'])) { } } - foreach($_POST['groupname'] as $groupname) { - if ($pconfig['utype'] <> "system" && !isset($groupindex[$groupname])) { - $input_errors[] = gettext("group {$groupname} does not exist, please define the group before assigning users."); - } + if(is_array($_POST['groupname'])) { + foreach($_POST['groupname'] as $groupname) { + if ($pconfig['utype'] <> "system" && !isset($groupindex[$groupname])) { + $input_errors[] = gettext("group {$groupname} does not exist, please define the group before assigning users."); + } + } } if (isset($config['system']['ssh']['sshdkeyonly']) && |