You are here

public function ChangePwdPageController::changePass in Password Separate Form 8

Redirects users to their password change form.

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

Return value

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

1 string reference to 'ChangePwdPageController::changePass'
change_pwd_page.routing.yml in ./change_pwd_page.routing.yml
change_pwd_page.routing.yml

File

src/Controller/ChangePwdPageController.php, line 89

Class

ChangePwdPageController
Controller routines for user routes.

Namespace

Drupal\change_pwd_page\Controller

Code

public function changePass() {
  return $this
    ->redirect('change_pwd_page.change_password_form', [
    'user' => $this
      ->currentUser()
      ->id(),
  ]);
}