modules/acm/src/Controller/CommerceUserController.php
public function getResetPassForm($email) {
    $timestamp = $this->session->get('pass_reset_timeout');
    $hash = $this->session->get('pass_reset_hash');

    // As soon as the session variables are used they are removed to prevent the
    // hash and timestamp from being leaked unexpectedly. This could occur if
    // the user does not click on the log in button on the form.
    $this->session->remove('pass_reset_timeout');
    $this->session->remove('pass_reset_hash');
    if (!$hash || !$timestamp) {
      throw new AccessDeniedHttpException();
    }

    // Time out, in seconds, until login URL expires.
    $timeout = $this->config('user.settings')->get('password_reset_timeout');
    $expiration_date = $this->dateFormatter->format($timestamp + $timeout);

    return $this->formBuilder()->getForm(CommerceUserPasswordResetForm::class, $email, $expiration_date, $timestamp, $hash);
  }
public function getResetPassForm($email) {
    $timestamp = $this->session->get('pass_reset_timeout');
    $hash = $this->session->get('pass_reset_hash');

    // As soon as the session variables are used they are removed to prevent the
    // hash and timestamp from being leaked unexpectedly. This could occur if
    // the user does not click on the log in button on the form.
    $this->session->remove('pass_reset_timeout');
    $this->session->remove('pass_reset_hash');
    if (!$hash || !$timestamp) {
      throw new AccessDeniedHttpException();
    }

    // Time out, in seconds, until login URL expires.
    $timeout = $this->config('user.settings')->get('password_reset_timeout');
    $expiration_date = $this->dateFormatter->format($timestamp + $timeout);

    return $this->formBuilder()->getForm(CommerceUserPasswordResetForm::class, $email, $expiration_date, $timestamp, $hash);
  }
public function getResetPassForm ( $ email ) { $ timestamp = $ this -> session -> get ( 'pass_reset_timeout' ) ; $ hash = $ this -> session -> get ( 'pass_reset_hash' ) ; // As soon as the session variables are used they are removed to prevent the // hash and timestamp from being leaked unexpectedly. This could occur if // the user does not click on the log in button on the form. $ this -> session -> remove ( 'pass_reset_timeout' ) ; $ this -> session -> remove ( 'pass_reset_hash' ) ; if ( ! $ hash || ! $ timestamp ) { throw new AccessDeniedHttpException ( ) ; } // Time out, in seconds, until login URL expires. $ timeout = $ this -> config ( 'user.settings' ) -> get ( 'password_reset_timeout' ) ; $ expiration_date = $ this -> dateFormatter -> format ( $ timestamp + $ timeout ) ; return $ this -> formBuilder ( ) -> getForm ( CommerceUserPasswordResetForm :: class , $ email , $ expiration_date , $ timestamp , $ hash ) ; }
Returns the user password reset form.

@param string $email
The base64 encoded email address of the user requesting a password reset.

@return array|\Symfony\Component\HttpFoundation\RedirectResponse
The form structure or a redirect response.

@throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
If the pass_reset_timeout or pass_reset_hash are not available in the
session. Or if $uid is for a blocked user or invalid user ID.
Returns the user password reset form .