You are here

function regcode_og_settings_submit in Registration codes 7

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

Form submit: Save settings form.

File

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

Code

function regcode_og_settings_submit($form, $form_state) {
  $machine_name = $form_state['regcode_og_rule']['machine_name'];
  $settings = variable_get('regcode_og_settings', array());
  $settings[$machine_name] = array(
    'name' => $form_state['values']['name'],
    'machine_name' => $machine_name,
    'ogs' => array_filter($form_state['values']['ogs']),
    'tid' => $form_state['values']['tid'],
  );
  variable_set('regcode_og_settings', $settings);
  drupal_set_message(t('Your settings have been saved.'));
  drupal_goto('admin/config/people/regcode/og');
}