Good Morning,
I have the following problem.
When I try to recover the password, I receive the email normally, with its message, but it does not come in the body of the message the link to reset the password. How should I proceed?
Hi,
I added this code to my functions.php:
add_filter(‘retrieve_password_message’, ‘password_reset_message’, 10, 3);
function password_reset_message($message, $reset_key, $userlogin)
{
$message .= ‘(‘ . network_site_url(‘wp-login.php?action=rp&key=’ . $reset_key . ‘&login=’. rawurlencode($userlogin), ‘login’) . ‘)’;
return $message;
}
The link to reset the password is sent to the email, however it is coming invalid, it does not come with the userid at the end of the link, eg:
To reset your password, visit the following address (https://mywebsite.com/wp-login.php?action=rp&key=b8kfCQVGpDX5kDI1SxsO&login=)
How do I make it come like this?
To reset your password, visit the following address (https://mywebsite.com/wp-login.php?action=rp&key=b8kfCQVGpDX5kDI1SxsO&login=userid)
Thanks!!
Hi,
I don’t understand exactly what you are trying to do. Maybe these topics would help you
– https://wordpress.stackexchange.com/questions/217980/where-is-the-email-content-for-retrieve-password-message-stored
– https://wordpress.stackexchange.com/questions/160456/how-to-apply-the-retrieve-password-message-filter
Thanks
For some reason, though – the password reset template (which works fine otherwise) will not append the user_login variable at the end of the password reset link – which is vital for the key to be valid. The link without the $user_login renders an “invalid key” error on the WP password reset page.
Can you help me? đ
Hi,
You could try other methods to reset your password. These are all mentioned here
– https://codex.wordpress.org/Resetting_Your_Password
Thanks