diff --git a/core/modules/user/lib/Drupal/user/Controller/UserController.php b/core/modules/user/lib/Drupal/user/Controller/UserController.php index 52c3fd2..495a5aa 100644 --- a/core/modules/user/lib/Drupal/user/Controller/UserController.php +++ b/core/modules/user/lib/Drupal/user/Controller/UserController.php @@ -10,7 +10,6 @@ use Drupal\Component\Utility\Xss; use Drupal\Core\Controller\ControllerBase; use Drupal\user\UserInterface; -use Drupal\user\Form\UserPasswordResetForm; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; @@ -116,10 +115,7 @@ public function resetPass($uid, $timestamp, $hash) { } elseif ($user->isAuthenticated() && $timestamp >= $user->getLastLoginTime() && $timestamp <= $current && $hash === user_pass_rehash($user->getPassword(), $timestamp, $user->getLastLoginTime())) { $expiration_date = $user->getLastLoginTime() ? $this->container()->get('date')->format($timestamp + $timeout) : NULL; - /* @var \Drupal\Core\Form\FormBuilderInterface $form_builder */ - $form_builder = $this->container()->get('form_builder'); - $form_instance = new UserPasswordResetForm(); - return $form_builder->getForm($form_instance, $user, $expiration_date, $timestamp, $hash); + return \Drupal::formBuilder()->getForm('Drupal\user\Form\UserPasswordResetForm', $user, $expiration_date, $timestamp, $hash); } else { 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.'));