function party_user_settings_form_submit in Party 8.2
Same name and namespace in other branches
- 7 modules/party_user/party_user.admin.inc \party_user_settings_form_submit()
Submit handler for the user integration settings form.
File
- modules/
party_user/ party_user.admin.inc, line 96 - Provide config forms for views
Code
function party_user_settings_form_submit($form, &$form_state) {
variable_set('party_user_on_registration', $form_state['values']['party_user_on_registration']);
variable_set('party_user_format_username', $form_state['values']['party_user_format_username']);
variable_set('party_user_party_delete_action', $form_state['values']['party_user_party_delete_action']);
if (module_exists('party_hat')) {
$registration_hats = $form_state['values']['registration_hats'];
foreach ($registration_hats as $key => $var) {
if ($var === 0) {
unset($registration_hats[$key]);
}
}
$registration_hats = array_keys($registration_hats);
variable_set('party_user_registration_hats', $registration_hats);
}
drupal_set_message(t('The configuration options have been saved.'));
// Email Sync Settings
$email_sync_fields = $form_state['values']['email_sync'];
$email_sync_fields = array_keys($email_sync_fields, TRUE);
variable_set('party_user_email_sync_fields', $email_sync_fields);
}