• I’m having trouble with the password-reset function here.
    Basically what I would like to do is send my members to wordpress’ classic login-page with it’s own “forgot-password”-page.
    I had problems users generating their new password because the plugin ithemes security enforces strong passwords and wordpress has a builtin password-tool that rates user’s passwords with a nice bar.
    I was able to change the forgot-password-link with this filter:

    add_filter( 'wpmem_forgot_link', 'my_forgot_link', 10, 2 );
    function my_forgot_link( $link, $tag ) {
        // Using home_url() instead makes your filter portable.
        return home_url() . '/wp-login.php?itsec-hb-token=mysupersecretlogin:-&action=lostpassword';
    }

    However this filter doesn’t work, if you have typed in a valid e-mail and a wrong password. Then a error message appears:

    Error: The password you entered for the email address no@mail.com is incorrect. Lost your password?

    The lost-password-link there is still the old wp-members-lost-password-link (that you can set by selecting a User Profile Page), not the filtered one.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Chad Butler

    (@cbutlerjr)

    The URL/link in the error message is actually generated by a different WP function and filter. You can change it by using lostpassword_url

    • This reply was modified 1 year, 8 months ago by Chad Butler. Reason: forgot link
    Thread Starter Matthias Baier

    (@ma_wordpressorg)

    Yes, I tried that filter too and it also works. But not if I set a User Profile Page. Then the error message contains wpmems link and not the ones defined by wpmem_forgot_link or lostpassword_url.

    Plugin Author Chad Butler

    (@cbutlerjr)

    Check your cache – either plugin or server-side. Those are the only two filters, and the error message link is specifically lostpassword_url, no matter where you are.

    Thread Starter Matthias Baier

    (@ma_wordpressorg)

    Hm… ok. I’ll try that tomorrow.
    I tested it in a local environment and on a server. Both filters work untill I set a User Profile Page. Then I end up with two forget links. The first one within the error notice-box, which is then set to the wp-member-link is the wrong one.

    The second one is below the login-fields and is correct with the wpmem_forgot_link from the filter.

    I can switch back an forth setting a User Profile Page and the links change accordingly.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Lost-Password link wrong inside error message’ is closed to new replies.