WordPress.org

Support

Support » How-To and Troubleshooting » Lost Password Reset – code error

Lost Password Reset – code error

  • I’m a new WP user and ran into some issues when I tried to move the subdirectory I had installed it on. Decided to just leave it where it was (some things worked, others didn’t when I moved it) but I noticed an issue with the Retrieve Password function for a lost password.

    In wp-login.php the SQL which resets a password references:
    $wpdb->query(“UPDATE $wpdb->users SET user_pass = MD5(‘$user_pass’) WHERE user_login = ‘$user_login'”);
    which didn’t work. $wpdb->users ended up being undefined so the SQL generated was invalid.

    I modified the SQL and replaced $wpdb->users with $tableusers and it worked fine.
    $wpdb->query(“UPDATE $tableusers SET user_pass = MD5(‘$user_pass’) WHERE user_login = ‘$user_login'”);

    I did some searching here and didn’t find a similar report but it could just be the search words I used. Sorry if it’s already been reported but maybe someone else will find a hit if they run into the same problem.

    I downloaded the latest version 1.2 version yesterday so I don’t think I have any old code.

    David

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Lost Password Reset – code error’ is closed to new replies.
Skip to toolbar