You are here

function rh_user_bundle_form_submit in Rabbit Hole 7.2

Submit callback for the bundle form.

This will set the values of the variables. Drupal will save these settings by default, but the name of those variables won't match our naming conventions, so we'll have to delete those after our variables has been saved.

File

modules/rh_user/rh_user.module, line 41
Main module file for Rabbit Hole users module.

Code

function rh_user_bundle_form_submit($form, $form_state) {
  $values = $form_state['values'];

  // Set the values of the variables.
  variable_set('rh_user_override_user', $values['rh_user_override']);
  variable_set('rh_user_action_user', $values['rh_user_action']);
  variable_set('rh_user_redirect_user', $values['rh_user_redirect']);
  variable_set('rh_user_redirect_response_user', $values['rh_user_redirect_response']);

  // Delete the ones that are automatically saved by Drupal.
  variable_del('rh_user_override');
  variable_del('rh_user_action');
  variable_del('rh_user_redirect');
  variable_del('rh_user_redirect_response');
}