function system_user_presave
system_user_presave(UserInterface $account)
Implements hook_ENTITY_TYPE_presave() for user entities.
File
- core/modules/system/system.module, line 780
- 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'); } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!system!system.module/function/system_user_presave/8.1.x