Request forgotten password problem

Posted in: Newspaper
Post count: 7

Good morning,
I have a problem with the frontend “forgotten password” request by the template mail.
If I try to reset password from the backend I receive this mail, and it’s the right system mail:

Reset from backend

but if I use the floating form of the template I get this (wrong) email for resetting my password:

Mail received usinf the template form

How can I fix it?
I need the first result in both the password request.. 🙁
If register from the floating form of the template I receive the right email template, so the problem is only for the password reset request.

Thank you very much
Best regards
Cristina

Post count: 22421

Unfortunately this seems to be an issue indeed and I will add it to our bug list and we will fix it in future updates. Sorry for the inconvenience and thank you for pointing this out. For a temporary solution, please follow this link to add a custom message in your password reset email: http://wordpress.stackexchange.com/questions/160456/how-to-apply-the-retrieve-password-message-filter

Thank you!

Post count: 7

Thank you very much, if I try to add this sample code to the functions.php the reset password doesn’t work anymore:

//* Password reset activation E-mail -> Body
add_filter( ‘retrieve_password_message’, ‘wpse_retrieve_password_message’, 10, 2 );
function wpse_retrieve_password_message( $message, $key ){
$user_data = ”;
// If no value is posted, return false
if( ! isset( $_POST[‘user_login’] ) ){
return ”;
}
// Fetch user information from user_login
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);
}
if( ! $user_data ){
return ”;
}
$user_login = $user_data->user_login;
$user_email = $user_data->user_email;
// Setting up message for retrieve password
$message = “Looks like you want to reset your password!\n\n”;
$message .= “Please click on this link:\n”;
$message .= ‘<a href=”‘;
$message .= network_site_url(“wp-login.php?action=rp&key=$key&login=” . rawurlencode($user_login), ‘login’);
$message .= ‘”>”‘;
$message .= network_site_url(“wp-login.php?action=rp&key=$key&login=” . rawurlencode($user_login), ‘login’);
$message .= ‘”\n\n”‘;
$message .= ‘Kind Regards,<br/>Dream Team’;
// Return completed message for retrieve password
return $message;
}

Any other advice?
Many thanks

Post count: 7909

Hi,

Until we manage to find a solution and fix it, please try to translate it from the code – http://screencast.com/t/a6DeB0uw6I3q

Thanks!

Post count: 7

Hi, thank you.
I fix the translation, this is what I get now (it’s without template anyway):

Password reset message

How can I get the link as clickable link and not like a written code text?
Then I’ll wait for the update 🙂

Many thanks
best regards
Cristina

Post count: 22421

Hello,

The link is clickable on our end so please remove your custom code and use the solution provided by Alin above. We have not tested your custom implementation so I cannot provide any custom solution for it. Remove the code and use the above solution.

Thank you!

Viewing 6 posts - 1 through 6 (of 6 total)
The forum ‘Newspaper’ is closed to new topics and replies.