You are here

public function UserCurrentPathsController::editRedirect in User current paths (user/edit & user/current/*) 8

Same name and namespace in other branches
  1. 2.0.x src/Controller/UserCurrentPathsController.php \Drupal\user_current_paths\Controller\UserCurrentPathsController::editRedirect()

Handles redirects to the user edit page (user/edit) for the currently logged in user.

Parameters

Request $request:

Return value

void

1 string reference to 'UserCurrentPathsController::editRedirect'
user_current_paths.routing.yml in ./user_current_paths.routing.yml
user_current_paths.routing.yml

File

src/Controller/UserCurrentPathsController.php, line 47

Class

UserCurrentPathsController

Namespace

Drupal\user_current_paths\Controller

Code

public function editRedirect(Request $request) {
  $route_name = 'entity.user.edit_form';
  $route_parameters = [
    'user' => \Drupal::currentUser()
      ->id(),
  ];
  return $this
    ->redirect($route_name, $route_parameters);
}