diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index 5472321..c1bbb3b 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -1526,10 +1526,12 @@ function watchdog_exception($type, Exception $exception, $message = NULL, $varia
  * @see hook_watchdog()
  */
 function watchdog($type, $message, array $variables = NULL, $severity = WATCHDOG_NOTICE, $link = NULL) {
-  global $user, $base_root;
+  global $base_root;
 
   static $in_error_state = FALSE;
 
+  $user = Drupal::request()->attributes->get('_account');
+
   // It is possible that the error handling will itself trigger an error. In that case, we could
   // end up in an infinite loop. To avoid that, we implement a simple static semaphore.
   if (!$in_error_state && function_exists('module_implements')) {
@@ -1881,7 +1883,7 @@ function drupal_handle_request($test_only = FALSE) {
  * Returns the time zone of the current user.
  */
 function drupal_get_user_timezone() {
-  global $user;
+  $user = Drupal::request()->attributes->get('_account');
   $config = Drupal::config('system.date');
 
   if ($user && $config->get('timezone.user.configurable') && $user->isAuthenticated() && $user->getTimezone()) {
@@ -2008,7 +2010,7 @@ function _drupal_bootstrap_kernel() {
  * Attempts to serve a page from the cache.
  */
 function _drupal_bootstrap_page_cache() {
-  global $user;
+  $user = Drupal::request()->attributes->get('_account');
 
   require_once __DIR__ . '/cache.inc';
   // Check for a cache mode force from settings.php.
