diff --git a/core/modules/user/src/Controller/UserController.php b/core/modules/user/src/Controller/UserController.php
index 89a3038..868ec50 100644
--- a/core/modules/user/src/Controller/UserController.php
+++ b/core/modules/user/src/Controller/UserController.php
@@ -15,7 +15,7 @@
 use Drupal\user\UserStorageInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
-
+use Symfony\Component\HttpFoundation\RedirectResponse;
 /**
  * Controller routines for user routes.
  */
@@ -216,4 +216,32 @@ public function confirmCancel(UserInterface $user, $timestamp = 0, $hashed_pass
     throw new AccessDeniedHttpException();
   }
 
+  /**
+   * Edit current user.
+   */
+  public function editCurrentUser() {
+    $account = \Drupal::currentUser();
+
+    $options = array();
+    if (isset($_GET['destination'])) {
+      $options['query'] = array('destination' => $_GET['destination']);
+    }
+
+    $url = \Drupal::url('entity.user.edit_form',
+      array('user' => $account->id()),$options);
+
+    // The login form is served to anonymous users.
+    if ($account->id() == 0) {
+      // If present, rewrite the destination parameter to
+      // avoid a redirect after the login form.
+      if (isset($_GET['destination'])) {
+        $options['query'] = 'user/edit?destination=' . $_GET['destination'];
+      }
+      $url = \Drupal::url('user.login',
+        array(),$options);
+    }
+
+    return  new RedirectResponse($url);
+  }
+
 }
diff --git a/core/modules/user/user.routing.yml b/core/modules/user/user.routing.yml
index 6eb709f..659a8ed 100644
--- a/core/modules/user/user.routing.yml
+++ b/core/modules/user/user.routing.yml
@@ -149,3 +149,11 @@ user.reset:
   options:
     _maintenance_access: TRUE
     no_cache: TRUE
+
+user.edit:
+  path: '/user/edit'
+  defaults:
+    _title: 'Log in'
+    _controller: '\Drupal\user\Controller\UserController::editCurrentUser'
+  requirements:
+    _access: 'TRUE'
