WordPress.org

Ready to get started?Download WordPress

Forums

Theme My Login
Fix for Invalid Key Password Reset (5 posts)

  1. dciso
    Member
    Posted 2 years ago #

    Using WordPress 3.2.1 and Theme My Login 6.1.4 I noticed the password reset was broken (gives an invalid key error), I thought I would share how I fixed this:

    See /plugins/theme-my-login/templates/resetpass-form.php OR edit the 'resetpass-form.php' inside your theme folder if you've copied across already.

    Find:

    <input type="hidden" name="key" value="<?php $template->the_posted_value( 'key' ); ?>" />
    <input type="hidden" name="login" id="user_login" value="<?php $template->the_get_value( 'login' ); ?>" />

    Replace With:

    <input type="hidden" name="key" value="<?php echo esc_attr($_GET['key']) ?>" />
    <input type="hidden" name="login" id="user_login" value="<?php echo esc_attr($_GET['login']); ?>" />

    Hopefully it saves somebody a few minutes trying to find the problem.
    Jason

    http://wordpress.org/extend/plugins/theme-my-login/

  2. Jeff Farthing
    Member
    Plugin Author

    Posted 2 years ago #

    Interesting, since all Theme_My_Login_Template::the_posted_value() does is return from the $_REQUEST array.

  3. fixanddestroy
    Member
    Posted 2 years ago #

    Hello!

    I'm having this same problem with Theme My Login 6.2.1 and WordPress 3.4.1. I tried the above fix, but I still get a "Sorry, that key does not appear to be valid." error upon trying to reset passwords. Since this is a group site with many users, I really need this functionality to be available.

    Does anyone have any advice about where I can start looking for a fix?

  4. Jeff Farthing
    Member
    Plugin Author

    Posted 2 years ago #

    Just noticed that your template calls:

    $template->the_get_value( 'login' );

    This is not a method of the Theme_My_Login_Template class. That should instead be:

    $template->the_posted_value( 'login' );.

  5. petate
    Member
    Posted 1 year ago #

    Just FYI guys, I had troubles with an invalid key on password renewal, and your solution solved it. I'm just sad I can't really explain why..

    Jeff, I double-checked and the "the_get_value" wasn't present at all on my templates.

    Thanks for this great plugin !

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic