From 153155d3a352699e7b669d0f01132c66a9c77eae Mon Sep 17 00:00:00 2001 From: Kevin Cristiano Date: Sun, 31 Jan 2016 23:36:17 -0700 Subject: [PATCH] CRM-16421- Remove hardcoded links to wp-login.php and ?action=lostpassword. Replace with WordPress functions --- CRM/Utils/System/WordPress.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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; } -- 2.25.1