This is a one-time login for %user_name.
Click on this button to log in to the site and change your password.
', array('%user_name' => $user->getUsername()))); + $form['message'] = array('#markup' => $this->t('This is a one-time login for %user_name.
Click on this button to log in to the site and change your password.
', array('%user_name' => $user->getUsername()))); } else { - $form['message'] = array('#markup' => $this->translationManager->translate('This is a one-time login for %user_name and will expire on %expiration_date.
Click on this button to log in to the site and change your password.
', array('%user_name' => $user->getUsername(), '%expiration_date' => $this->date->format($timestamp + $timeout)))); + $form['message'] = array('#markup' => $this->t('This is a one-time login for %user_name and will expire on %expiration_date.
Click on this button to log in to the site and change your password.
', array('%user_name' => $user->getUsername(), '%expiration_date' => $this->date->format($timestamp + $timeout)))); } - $form['help'] = array('#markup' => '' . $this->translationManager->translate('This login can be used only once.') . '
'); + $form['help'] = array('#markup' => '' . $this->t('This login can be used only once.') . '
'); $form['actions'] = array('#type' => 'actions'); - $form['actions']['submit'] = array('#type' => 'submit', '#value' => $this->translationManager->translate('Log in')); - $form['#action'] = $this->urlGenerator->generateFromPath("user/reset/$uid/$timestamp/$hash/login"); + $form['actions']['submit'] = array('#type' => 'submit', '#value' => $this->t('Log in')); + $form['#action'] = $this->urlGenerator->generateFromRoute('user_pass_reset', array('uid' => $uid, 'timestamp' => $timestamp, 'hash' => $hash, 'operation' => 'login')); return $form; } } else { - drupal_set_message($this->translationManager->translate('You have tried to use a one-time login link that has either been used or is no longer valid. Please request a new one using the form below.')); - return new RedirectResponse($this->urlGenerator->generateFromPath('user/password', array('absolute' => TRUE))); + drupal_set_message($this->t('You have tried to use a one-time login link that has either been used or is no longer valid. Please request a new one using the form below.')); + return new RedirectResponse($this->urlGenerator->generateFromRoute('user_pass', array(), array('absolute' => TRUE))); } } else { @@ -186,13 +173,6 @@ } /** - * {@inheritdoc} - */ - public function validateForm(array &$form, array &$form_state) { - - } - - /** * {@inheritdoc} */ public function submitForm(array &$form, array &$form_state) {