summaryrefslogtreecommitdiffstats
path: root/core/modules/user/user.api.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/user/user.api.php')
-rw-r--r--core/modules/user/user.api.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/modules/user/user.api.php b/core/modules/user/user.api.php
index 364dd1a..823c08d 100644
--- a/core/modules/user/user.api.php
+++ b/core/modules/user/user.api.php
@@ -137,7 +137,14 @@ function hook_user_login($account) {
$config = \Drupal::config('system.date');
// If the user has a NULL time zone, notify them to set a time zone.
if (!$account->getTimezone() && $config->get('timezone.user.configurable') && $config->get('timezone.user.warn')) {
- drupal_set_message(t('Configure your <a href=":user-edit">account time zone setting</a>.', [':user-edit' => $account->url('edit-form', ['query' => \Drupal::destination()->getAsArray(), 'fragment' => 'edit-timezone'])]));
+ \Drupal::messenger()
+ ->addStatus(t('Configure your <a href=":user-edit">account time zone setting</a>.', [
+ ':user-edit' => $account->url('edit-form', [
+ 'query' => \Drupal::destination()
+ ->getAsArray(),
+ 'fragment' => 'edit-timezone',
+ ]),
+ ]));
}
}