Found a possible bug in the password recovery e-mail.
-
Hi,
Been using this plugin for a client.
I may have found a possible bug in the code that manages the recovery of user passwords.
In the e-mails that are sent, the shortcode [user_login] is replaced with the user ID.After a few hours of searching, I found that it is within this function sb_we_lost_password_message in the file sb_welcome_email_editor.php (the only file really).
The patch can be applied after the global variable $wpdb declaration at the top..
if (is_int($user_login)) {
$user_info = get_user_by(‘id’, $user_login);
$user_login = $user_info->user_login;
}This will detect if the user login is an unusual integer (it should be string), and if so, searches the user database by ID and reassigns the user login to the variable.
It has been tested a number of times to be working.
If there is a better fix, do suggest.
Thank you.
- The topic ‘Found a possible bug in the password recovery e-mail.’ is closed to new replies.