You are here

function content_profile_admin_settings_submit in Content Profile 6

File

./content_profile.module, line 176

Code

function content_profile_admin_settings_submit($form, &$form_state) {
  $settings = content_profile_get_settings($form_state['type']);
  foreach (content_profile_settings_info() as $setting => $default) {
    if (isset($form_state['values'][$setting])) {
      $settings[$setting] = $form_state['values'][$setting];
    }
  }
  content_profile_set_settings($form_state['type'], $settings);
  drupal_set_message('Your changes have been saved.');
  menu_rebuild();
}