diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php index dd7b8a0..708213b 100644 --- a/core/modules/system/system.api.php +++ b/core/modules/system/system.api.php @@ -2127,7 +2127,7 @@ function hook_file_download($uri) { */ function hook_file_url_alter(&$uri) { // User 1 will always see the local file in this example. - if (Drupal::currentUser()->id() == 1) { + if (\Drupal::currentUser()->id() == 1) { return; } @@ -2995,7 +2995,7 @@ function hook_url_outbound_alter(&$path, &$options, $original_path) { // Instead of pointing to user/[uid]/edit, point to user/me/edit. if (preg_match('|^user/([0-9]*)/edit(/.*)?|', $path, $matches)) { - if (Drupal::currentUser()->id() == $matches[1]) { + if (\Drupal::currentUser()->id() == $matches[1]) { $path = 'user/me/edit' . $matches[2]; } } diff --git a/core/modules/system/system.module b/core/modules/system/system.module index 0cbdb20..940bbe7 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -123,7 +123,7 @@ function system_help($path, $arg) { } break; case 'admin/config/development/maintenance': - if (Drupal::currentUser()->id() == 1) { + if (\Drupal::currentUser()->id() == 1) { return '

' . t('Use maintenance mode when making major updates, particularly if the updates could disrupt visitors or the update process. Examples include upgrading, importing or exporting content, modifying a theme, modifying content types, and making backups.') . '

'; } break; @@ -2236,7 +2236,7 @@ function system_user_login($account) { * Add the time zone field to the user edit and register forms. */ function system_user_timezone(&$form, &$form_state) { - $user = Drupal::currentUser(); + $user = \Drupal::currentUser(); $account = $form_state['controller']->getEntity(); $form['timezone'] = array(