You are here

public function UserController::userEditPage in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/user/src/Controller/UserController.php \Drupal\user\Controller\UserController::userEditPage()

Redirects users to their profile edit page.

This controller assumes that it is only invoked for authenticated users. This is enforced for the 'user.well-known.change_password' route with the '_user_is_logged_in' requirement.

Return value

\Symfony\Component\HttpFoundation\RedirectResponse Returns a redirect to the profile edit form of the currently logged in user.

1 string reference to 'UserController::userEditPage'
user.routing.yml in core/modules/user/user.routing.yml
core/modules/user/user.routing.yml

File

core/modules/user/src/Controller/UserController.php, line 295

Class

UserController
Controller routines for user routes.

Namespace

Drupal\user\Controller

Code

public function userEditPage() {
  return $this
    ->redirect('entity.user.edit_form', [
    'user' => $this
      ->currentUser()
      ->id(),
  ], [], 301);
}