summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr/local/www/system_usermanager.php10
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']) &&
OpenPOWER on IntegriCloud