CRM-18317 - Links to Drupal system broken if hook altered by a module
authorrollox <rollox@users.noreply.github.com>
Wed, 30 Mar 2016 22:19:46 +0000 (23:19 +0100)
committerrollox <rollox@users.noreply.github.com>
Wed, 30 Mar 2016 22:19:46 +0000 (23:19 +0100)
Let Drupal render the system url for 'user/password' instead of Civi, so that any Drupal hooks that alter this path have a chance to do so.

CRM/Utils/System/Drupal.php

index 008b801cbaf2d015df52e42ab6a8c9e8079db65e..3b214841b9da6742cb782c980faba40633efeae7 100644 (file)
@@ -149,7 +149,7 @@ class CRM_Utils_System_Drupal extends CRM_Utils_System_DrupalBase {
           array(':mail' => $params['mail'])
         )->fetchField();
         if ((bool) $uid) {
-          $resetUrl = $config->userFrameworkBaseURL . 'user/password';
+          $resetUrl = url('user/password');
           $errors[$emailName] = ts('The email address %1 is already registered. <a href="%2">Have you forgotten your password?</a>',
             array(1 => $params['mail'], 2 => $resetUrl)
           );