diff --git a/core/modules/user/lib/Drupal/user/AccountFormController.php b/core/modules/user/lib/Drupal/user/AccountFormController.php index 49b0cba..709951a 100644 --- a/core/modules/user/lib/Drupal/user/AccountFormController.php +++ b/core/modules/user/lib/Drupal/user/AccountFormController.php @@ -70,8 +70,8 @@ public function form(array $form, array &$form_state) { // To skip the current password field, the user must have logged in via a // one-time link and have the token in the URL. - $query = \Drupal::request()->query; - $pass_reset = isset($_SESSION['pass_reset_' . $account->uid]) && ($query->get('pass-reset-token') == $_SESSION['pass_reset_' . $account->uid]); + $pass_reset = isset($_SESSION['pass_reset_' . $account->id()]) && (\Drupal::request()->query->get('pass-reset-token') == $_SESSION['pass_reset_' . $account->id()]); + $protected_values = array(); $current_pass_description = '';