You are here

function regcode_og_create_submit in Registration codes 7

Same name and namespace in other branches
  1. 7.2 regcode_og/regcode_og.module \regcode_og_create_submit()

Form submit: Create a new rule set.

File

regcode_og/regcode_og.module, line 232
Install, uninstall and scheme functions for the regcode_og module.

Code

function regcode_og_create_submit($form, $form_state) {
  $machine_name = $form_state['values']['machine_name'];
  $settings = variable_get('regcode_og_settings', array());
  $settings[$machine_name] = array(
    'name' => $form_state['values']['name'],
    'machine_name' => $form_state['values']['machine_name'],
    'ogs' => array_filter($form_state['values']['ogs']),
    'tid' => $form_state['values']['tid'],
  );
  variable_set('regcode_og_settings', $settings);
  drupal_set_message(t('New og rule created'));
  drupal_goto('admin/config/people/regcode/og');
}