summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDries2013-08-13 14:59:28 -0400
committerDries2013-08-13 14:59:28 -0400
commitc8dec31b3e85a6782d6214f8cc80bc06f2c9d3cf (patch)
treef1b9354b54737b64f8887d554e66bf3d4e9e503c
parenta567be3ee03182a7ef0982db9ca8ef548296779e (diff)
Issue #1999448 by chertzog, aaronott, chrisjlee, daffodil_naveen, kim.pepper: Use Symfony Request for user module.
-rw-r--r--core/modules/user/lib/Drupal/user/AccountFormController.php3
-rw-r--r--core/modules/user/user.pages.inc5
2 files changed, 5 insertions, 3 deletions
diff --git a/core/modules/user/lib/Drupal/user/AccountFormController.php b/core/modules/user/lib/Drupal/user/AccountFormController.php
index c00b982..709951a 100644
--- a/core/modules/user/lib/Drupal/user/AccountFormController.php
+++ b/core/modules/user/lib/Drupal/user/AccountFormController.php
@@ -70,7 +70,8 @@ abstract class AccountFormController extends EntityFormControllerNG {
// 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 = isset($_SESSION['pass_reset_' . $account->id()]) && isset($_GET['pass-reset-token']) && ($_GET['pass-reset-token'] == $_SESSION['pass_reset_' . $account->id()]);
+ $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 = '';
diff --git a/core/modules/user/user.pages.inc b/core/modules/user/user.pages.inc
index 04bd69c..33e2593 100644
--- a/core/modules/user/user.pages.inc
+++ b/core/modules/user/user.pages.inc
@@ -123,9 +123,10 @@ function template_preprocess_user(&$variables) {
*/
function user_edit_cancel_submit($form, &$form_state) {
$destination = array();
- if (isset($_GET['destination'])) {
+ $query = Drupal::request()->query;
+ if ($query->has('destination')) {
$destination = drupal_get_destination();
- unset($_GET['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();