diff --git a/core/modules/user/lib/Drupal/user/AccountFormController.php b/core/modules/user/lib/Drupal/user/AccountFormController.php index 18fd3da..bb1a411 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. - $pass_reset_token = Drupal::request()->request->get('pass-reset-token'); - $pass_reset = isset($_SESSION['pass_reset_' . $account->uid]) && isset($pass_reset_token) && ($pass_reset_token == $_SESSION['pass_reset_' . $account->uid]); + $query = \Drupal::request()->query; + $pass_reset = isset($_SESSION['pass_reset_' . $account->uid]) && $query->has('pass-reset-token') && ($query->get('pass-reset-token') == $_SESSION['pass_reset_' . $account->uid]); $protected_values = array(); $current_pass_description = ''; diff --git a/core/modules/user/user.pages.inc b/core/modules/user/user.pages.inc index 571c674..f505cd8 100644 --- a/core/modules/user/user.pages.inc +++ b/core/modules/user/user.pages.inc @@ -123,10 +123,10 @@ function template_preprocess_user(&$variables) { */ function user_edit_cancel_submit($form, &$form_state) { $destination = array(); - $destination_get = Drupal::request()->query->get('destination'); - if (isset($destination_get)) { + $query = Drupal::request()->query; + if ($query->has('destination')) { $destination = drupal_get_destination(); - Drupal::request()->query->remove('destination'); + $query->remove('destination'); } // Note: We redirect from user/uid/edit to user/uid/cancel to make the tabs disappear. $account = $form_state['controller']->getEntity();