UserController::userPage

public UserController::userPage()

Redirects users to their profile page.

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

Return value

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

File

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

Class

UserController
Controller routines for user routes.

Namespace

Drupal\user\Controller

Code

public function userPage() {
  return $this->redirect('entity.user.canonical', array('user' => $this->currentUser()->id()));
}
doc_Drupal
2016-10-29 09:52:28
Comments
Leave a Comment

Please login to continue.