1.20.x system.module system_user_presave($account)

Implements hook_user_presave().

File

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

Code

function system_user_presave($account) {
  $config = config('system.date');
  if ($config->get('user_configurable_timezones') && empty($account->timezone) && !$config->get('user_default_timezone')) {
    $account->timezone = $config->get('default_timezone');
  }
}