WordPress background-> appearance-> Edit-> template function (functions.php)
/ / resolve invalid password recovery link
function reset_password_message ($message, $key) {
if ( strpos($_POST["user_login"], "@") ) {
$user_data = get_user_by("email", trim($_POST["user_login"]));
} else {
$login = trim($_POST["user_login"]);
$user_data = get_user_by("login", $login);
}
$user_login = $user_data->user_login;
$msg = __(":"). "\r\n\r\n";
$msg .= network_site_url() . "\r\n\r\n";
$msg .= sprintf(__(":%s"), $user_login) . "\r\n\r\n";
$msg .= __("") . "\r\n\r\n";
$msg .= __(":"). "\r\n\r\n";
$msg .= network_site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user_login), "login") ;
return $msg;
}
add_filter ("retrieve_password_message", reset_password_message, null, 2);
modify the wp-login.php file
$message. = network_site_url ("wp-login.php?action=rp&key=$key&login=") in the WordPress root directory. Rawurlencode ($user_login), "login");
modify according to the above method, but the email address received is still with < >
.