system_user_presave(UserInterface $account)
Implements hook_ENTITY_TYPE_presave() for user entities.
File
- core/modules/system/system.module, line 779
- Configuration system that lets administrators modify the workings of the site.
Code
function system_user_presave(UserInterface $account) { $config = \Drupal::config('system.date'); if ($config->get('timezone.user.configurable') && !$account->getTimeZone() && !$config->get('timezone.user.default')) { $account->timezone = $config->get('timezone.default'); } }
Please login to continue.