function user_form_system_regional_settings_submit

Same name in other branches
  1. 9 core/modules/user/user.module \user_form_system_regional_settings_submit()
  2. 8.9.x core/modules/user/user.module \user_form_system_regional_settings_submit()
  3. 10 core/modules/user/user.module \user_form_system_regional_settings_submit()

Additional submit handler for \Drupal\system\Form\RegionalForm.

1 string reference to 'user_form_system_regional_settings_submit'
user_form_system_regional_settings_alter in core/modules/user/user.module
Implements hook_form_FORM_ID_alter() for \Drupal\system\Form\RegionalForm.

File

core/modules/user/user.module, line 1200

Code

function user_form_system_regional_settings_submit($form, FormStateInterface $form_state) {
    \Drupal::configFactory()->getEditable('system.date')
        ->set('timezone.user.configurable', $form_state->getValue('configurable_timezones'))
        ->set('timezone.user.warn', $form_state->getValue('empty_timezone_message'))
        ->set('timezone.user.default', $form_state->getValue('user_default_timezone'))
        ->save();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.