From 404815e3a1d95e7e6d4830c79656c29414e6ed32 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Thu, 10 Jul 2014 11:23:42 +1200 Subject: [PATCH] CRM-14967 fix redirect link --- CRM/Utils/System/Drupal.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/CRM/Utils/System/Drupal.php b/CRM/Utils/System/Drupal.php index 5f757822c1..1104396748 100644 --- a/CRM/Utils/System/Drupal.php +++ b/CRM/Utils/System/Drupal.php @@ -51,7 +51,7 @@ class CRM_Utils_System_Drupal extends CRM_Utils_System_DrupalBase { */ function createUser(&$params, $mail) { $form_state = form_state_defaults(); - + $form_state['input'] = array( 'name' => $params['cms_name'], 'mail' => $params[$mail], @@ -217,14 +217,8 @@ class CRM_Utils_System_Drupal extends CRM_Utils_System_DrupalBase { * @static */ public function getLoginURL($destination = '') { - $config = CRM_Core_Config::singleton(); - $loginURL = $config->userFrameworkBaseURL; - $loginURL .= 'user'; - if (!empty($destination)) { - // append destination so user is returned to form they came from after login - $loginURL .= '?destination=' . urlencode($destination); - } - return $loginURL; + $query = $destination ? array('destination' => $destination) : array(); + return url('user', array('query' => $query)); } -- 2.25.1