From: Kevin Cristiano Date: Mon, 1 Feb 2016 06:36:17 +0000 (-0700) Subject: CRM-16421- Remove hardcoded links to wp-login.php and ?action=lostpassword. Replace... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=153155d3a352699e7b669d0f01132c66a9c77eae;p=civicrm-core.git CRM-16421- Remove hardcoded links to wp-login.php and ?action=lostpassword. Replace with WordPress functions --- diff --git a/CRM/Utils/System/WordPress.php b/CRM/Utils/System/WordPress.php index 63ab4e3dba..4f8c32b305 100644 --- a/CRM/Utils/System/WordPress.php +++ b/CRM/Utils/System/WordPress.php @@ -578,9 +578,8 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { $errors[$emailName] = "Your email is invaid"; } elseif (email_exists($params['mail'])) { - $resetUrl = $config->userFrameworkBaseURL . 'wp-login.php?action=lostpassword'; $errors[$emailName] = ts('The email address %1 already has an account associated with it. Have you forgotten your password?', - array(1 => $params['mail'], 2 => $resetUrl) + array(1 => $params['mail'], 2 => wp_lostpassword_url()) ); } } @@ -650,8 +649,7 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { */ public function getLoginURL($destination = '') { $config = CRM_Core_Config::singleton(); - $loginURL = $config->userFrameworkBaseURL; - $loginURL .= 'wp-login.php'; + $loginURL = wp_login_url(); return $loginURL; }