Index: og_mandatory_group.module =================================================================== --- og_mandatory_group.module (revision 40) +++ og_mandatory_group.module (working copy) @@ -20,7 +20,9 @@ function og_mandatory_group_user($op, &$edit, &$account, $category = NULL) { switch ($op) { case 'insert': - if (($group = variable_get('og_mandatory_group', 0)) != 0) { + $groups = variable_get('og_mandatory_group',array()); + if (count($groups) != 0){ + foreach($groups as $group){ og_save_subscription($group, $account->uid, array('is_active' => 1)); // mail the admins $node = node_load($group); @@ -66,6 +68,7 @@ } } } + } break; } } @@ -90,7 +93,7 @@ } } if (count($options)) { - $form['og_mandatory_group'] = array('#type' => 'radios', '#options' => $options, '#default_value' => variable_get('og_mandatory_group', 0)); + $form['og_mandatory_group'] = array('#type' => 'checkboxes', '#options' => $options, '#default_value' => variable_get('og_mandatory_group', 0)); return $form; } }