From 6a13b6a840b2809b8cd5ed4c2e4a7ad16ed4207d Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Wed, 23 Oct 2013 12:05:27 -0700
Subject: [PATCH] Issue #2062183 by cloud2006, LinL, m1r1k, likin: Remove calls
 to deprecated global  in
 core/modules/user/lib/Drupal/user/AccountFormController.php.

---
 core/modules/user/lib/Drupal/user/AccountFormController.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/modules/user/lib/Drupal/user/AccountFormController.php b/core/modules/user/lib/Drupal/user/AccountFormController.php
index 882dc2856601..714011222c02 100644
--- a/core/modules/user/lib/Drupal/user/AccountFormController.php
+++ b/core/modules/user/lib/Drupal/user/AccountFormController.php
@@ -48,7 +48,7 @@ public static function create(ContainerInterface $container) {
    */
   public function form(array $form, array &$form_state) {
     $account = $this->entity;
-    global $user;
+    $user = $this->currentUser();
     $config = \Drupal::config('user.settings');
 
     $language_interface = language(Language::TYPE_INTERFACE);
-- 
GitLab