function system_user_presave

Implements hook_user_presave().

File

drupal/core/modules/system/system.module, line 2426
Configuration system that lets administrators modify the workings of the site.

Code

function system_user_presave($account) {
  $config = config('system.date');
  if ($config
    ->get('timezone.user.configurable') && empty($account->timezone) && !$config
    ->get('timezone.user.default')) {
    $account->timezone = $config
      ->get('timezone.default');
  }
}