var check to make sure groups array is set before examining it, to eliminate PHP warning

This commit is contained in:
shrykedude 2003-11-06 23:08:10 +00:00
parent 3ae4338b2e
commit 9fc3c9b55b

View File

@ -591,7 +591,7 @@
'account_expires_never' => $_POST['never_expires']
/* 'file_space' => $_POST['account_file_space_number'] . "-" . $_POST['account_file_space_type'] */
);
if ($userData['account_primary_group'] && !in_array($userData['account_primary_group'],$userData['account_groups']))
if ($userData['account_primary_group'] && (!isset($userData['account_groups']) || !in_array($userData['account_primary_group'],$userData['account_groups'])))
{
$userData['account_groups'][] = intval($userData['account_primary_group']);
}