• Resolved myteejoeyoung

    (@myteejoeyoung)


    First, thanks for such a great plugin. It has been very helpful. In all my attempt to bypass Force Login for the various registration and activation pages, I found the code below from your support forum to be the most helpful (since I am running the Buddy Press plugin and corresponding registration and activation pages). My question is this: can the WP login apparatus/urls be added to this exception code, specifically the WP lost password apparatus/urls? Is there a catch all for those pages, like below? I think I have an idea, but need help with the right nomenclature.

    /**
    * Bypass Force Login to allow for exceptions.
    *
    * @param bool $bypass Whether to disable Force Login. Default false.
    * @return bool
    */
    function my_forcelogin_bypass( $bypass ) {
    // add exception for BuddyPress URLs
    if ( function_exists( ‘bp_is_register_page’ ) ) {
    if ( bp_is_register_page() || bp_is_activation_page() ) {
    $bypass = true;
    }
    }
    return $bypass;
    }
    add_filter( ‘v_forcelogin_bypass’, ‘my_forcelogin_bypass’ );

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Kevin Vess

    (@kevinvess)

    Hi– thanks for using Force Login!

    can the WP login apparatus/urls be added to this exception code, specifically the WP lost password apparatus/urls? Is there a catch all for those pages, like below?

    I’m not sure I understand your question.

    Force Login already allows public access to the builtin WordPress login, lost-password, and registration URLs.

    However, when you add plugins or custom code which change those default login screen URLs, you will need to tell Force Login to bypass those custom URLs using the v_forcelogin_bypass filter.

    You can add as many conditional statements necessary to your v_forcelogin_bypass filter function to tell Force Login to allow public access to the site.

    Thread Starter myteejoeyoung

    (@myteejoeyoung)

    Thanks,

    I realized that a plugin called Youzify is interfering with the default exceptions of “Force Login”. I will work on adding exceptions to use_forcelogin_bypass for the URL’s it uses. I will have to dig into their code though and find those.

    Joe

    @myteejoeyoung did you find the solution with Youzify? If so, any chance you’re willing to share the solution? Willing to pay for the solution too. ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Bypass Force Login For Password Pages’ is closed to new replies.