public function UserCurrentPathsController::editRedirect in User current paths (user/edit & user/current/*) 8
Same name and namespace in other branches
- 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'
File
- src/
Controller/ UserCurrentPathsController.php, line 47
Class
Namespace
Drupal\user_current_paths\ControllerCode
public function editRedirect(Request $request) {
$route_name = 'entity.user.edit_form';
$route_parameters = [
'user' => \Drupal::currentUser()
->id(),
];
return $this
->redirect($route_name, $route_parameters);
}