Skip to:
Content
Pages
Categories
Search
Top
Bottom

lost password recovery link not working

  • Avatar of raminjan
    raminjan
    Participant

    @raminjan

    hi guys for some reason my lost password link is referring back to my landing page but it’s doing this just because I inserted this code in the bp-default function.php file which this code is for wrong password entry. which basically links back to the landing page because user entered the wrong password. but now my Lost your password? Link won’t work any ideas?

    add_action( ‘wp_login_failed’, ‘my_front_end_login_fail’ ); // hook failed login

    function my_front_end_login_fail( $username ) {
    $referrer = $_SERVER['HTTP_REFERER']; // where did the post submission come from?
    // if there’s a valid referrer, and it’s not the default log-in screen
    if ( !empty($referrer) && !strstr($referrer,’wp-login’) && !strstr($referrer,’wp-admin’) ) {
    wp_redirect( $referrer . ‘?login=failed’ );
    exit;
    }
    }

You must be logged in to reply to this topic.