diff --git a/core/modules/shortcut/shortcut.admin.inc b/core/modules/shortcut/shortcut.admin.inc index 2d6b49d..41214bc 100644 --- a/core/modules/shortcut/shortcut.admin.inc +++ b/core/modules/shortcut/shortcut.admin.inc @@ -133,7 +133,7 @@ function shortcut_set_switch_validate($form, &$form_state) { * Submit handler for shortcut_set_switch(). */ function shortcut_set_switch_submit($form, &$form_state) { - global $user; + $user = \Drupal::currentUser(); $account = $form_state['values']['account']; if ($form_state['values']['set'] == 'new') { diff --git a/core/modules/shortcut/shortcut.module b/core/modules/shortcut/shortcut.module index 8ca0472..1f1db68 100644 --- a/core/modules/shortcut/shortcut.module +++ b/core/modules/shortcut/shortcut.module @@ -308,7 +308,7 @@ function shortcut_set_unassign_user($account) { */ function shortcut_current_displayed_set($account = NULL) { $shortcut_sets = &drupal_static(__FUNCTION__, array()); - global $user; + $user = \Drupal::currentUser(); if (!isset($account)) { $account = $user; } @@ -345,7 +345,7 @@ function shortcut_current_displayed_set($account = NULL) { * An object representing the default shortcut set. */ function shortcut_default_set($account = NULL) { - global $user; + $user = \Drupal::currentUser(); if (!isset($account)) { $account = $user; }