Lost Password 1.2 Mingus Bug & Fix (sort of)
-
I’m not a dev, but I found a bug and kind of fixed it. Whether you keep this fix or change it a bit doesn’t matter to me, but it is important.
The lost password thing does not work, AND the emails sent by WP in wp-login.php (and probably other areas) have no “From” specified.
When requesting a new password, the emails are screwed up, they arrive from “Nobody” and the password doesn’t get reset in the db. All because of one teensy mistake. ??
Occuring between line 199 and 232 of wp-login.php in the “retrievepassword” case.
Original:
// redefining user_login ensures we return the right case in the email
$user_login = $user_data['user_login'];
$user_email = $user_data->user_email;
Fixed:
// redefining user_login ensures we return the right case in the email
$user_login = $user_data->user_login;
$user_email = $user_data->user_email;
Original:
$m = mail($user_email, '[' . get_settings('blogname') . "] Your weblog's login/password", $message);
Suggestion:
$m = mail($user_email, '[' . get_settings('blogname') . "] Your weblog's login/password", $message, 'From: ' .get_settings('blogname'). ' WordPress Admin <' .get_settings('admin_email'). '>');
Original:
// send a copy of password change notification to the admin
mail(get_settings('admin_email'), '[' . get_settings('blogname') . "] Password Lost/Change", "Password Lost and Changed for user: $user_login");
Suggestion;
// send a copy of password change notification to the admin
mail(get_settings('admin_email'), '[' . get_settings('blogname') . "] Password Lost/Change", "Password Lost and Changed for user: $user_login", 'From: ' .get_settings('blogname'). ' WordPress <' .get_settings('admin_email'). '>');
- The topic ‘Lost Password 1.2 Mingus Bug & Fix (sort of)’ is closed to new replies.