• Resolved tjkidder12

    (@tjkidder12)


    Hello there,

    I have seen this issue arise before however the fixes provided in previous post did not work. I need my “register” page and my “activate/?/” page whitelisted so my users can complete their registration. this is the code i am using now:

    /**
    * Filter Force Login to allow exceptions for specific URLs.
    *
    * @return array An array of URLs. Must be absolute.
    **/
    function my_forcelogin_whitelist( $whitelist ) {
    $whitelist[] = site_url( ‘/register/’ );
    $whitelist[] = site_url( ‘/activate/?’ );
    return $whitelist;
    }
    add_filter(‘v_forcelogin_whitelist’, ‘my_forcelogin_whitelist’, 10, 1);

    https://www.ads-software.com/plugins/wp-force-login/

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

    (@kevinvess)

    I need my “register” page and my “activate/?/” page whitelisted so my users can complete their registration.

    Those look like custom registration URLs, this plugin was built to work with the standard WordPress register URLs.

    I suspect you’re using another plugin or a custom script to alter your sites registration URLs. To whitelist those custom URLs, you likely need to use one of the Whitelist Dynamic URLs examples outlined on the FAQ page:
    https://github.com/kevinvess/wp-force-login/wiki/Whitelist-Dynamic-URLs

    Thread Starter tjkidder12

    (@tjkidder12)

    I am using buddypress, so when I installed the plugin those were the pages that were built out. Does that narrow down my search at all to what the issue may be?

    Plugin Author Kevin Vess

    (@kevinvess)

    Ah, you’re using BuddyPress –?well, the same answer could still apply; you’ll need to whitelist the dynamic URLs.

    However, I’ve addressed this before using BuddyPress functions:
    https://www.ads-software.com/support/topic/compatible-with-buddypress-4?replies=6#post-7405474

    rwdbrooks

    (@rwdbrooks)

    Hello,

    Let me begin by saying I’m a total newb.

    I’m also using buddypress and would like to use your plugin to restrict access to a private forum. I tried adding the code you referenced in your other post the the functions.php file in my child theme but it didn’t work.

    What i get is a redirect back to the login screen, it doesn’t redirect to either the WP login or preferably to the buddypress registration.

    Thanks!

    Plugin Author Kevin Vess

    (@kevinvess)

    @rwdbrooks

    Thanks for using Force Login!

    Try adding the following code snippet to your functions.php file:

    /**
     * Bypass Force Login to allow for exceptions.
     * 
     * @return bool Whether to disable Force Login. Default false.
     */
    function my_forcelogin_bypass( $bypass ) {
      // add exception for buddypress login 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', 10, 1);

    What i get is a redirect back to the login screen, it doesn’t redirect to either the WP login or preferably to the buddypress registration.

    Can you give me more details; what are you doing? what are you expecting to happen but isn’t?

    You said you’re redirected back to the login screen but not the “WP login” –?if not the standard WordPress login screen (/wp-login.php), then what screen (url) are you being redirected to?

    Have you changed the default WordPress login URL?

    What other plugins are you using?

    rwdbrooks

    (@rwdbrooks)

    Kevin,

    Thanks for the prompt reply.

    I wanted to bring up the buddypress registration page instead of the standard WP register page.

    And…that did it!

    Many thanks!

    Plugin Author Kevin Vess

    (@kevinvess)

    Great!?I’m glad you were able to get it working.

    Be sure to rate and review my plugin to let others know how you like it; enjoy!

    rwdbrooks

    (@rwdbrooks)

    Kevin,

    I guess I spoke too soon.

    So, someone comes to my site and are given a standard wp-login page. They hit register and it takes them to the buddypress registration page. Great.

    They’re confirmed, sent an email to activate and when they click on that link, it brings them to a buddypress (kleo themed) login.

    Then, once I login through there, it then redirects to wp-login page, then I have to login again and then it redirects to wp-admin instead of the front page of the site.

    Not sure if it’s a result of the force login plugin or a buddypress glitch.

    my page is smartcitiescollaborative.org – you can try and register, etc. and see the problem.

    Thanks!

    Plugin Author Kevin Vess

    (@kevinvess)

    once I login through [the buddypress (kleo themed) login], it then redirects to wp-login page, then I have to login again and then it redirects to wp-admin instead of the front page of the site.

    Try something for me;?after you login through the buddypress login and it redirects you to the wp-login page – don’t login again – just change the URL in the address bar to https://smartcitiescollaborative.org/wp-admin/ to confirm you’re already logged-in.

    I’m wondering if maybe the buddypress login is redirecting you to the wp-login because of a setting or because it didn’t authenticate you as a logged-in user.

    The only reason Force Login would redirect you to the wp-login screen is if WordPress doesn’t recognize you as a logged-in user.

    • This reply was modified 8 years ago by Kevin Vess.
    rwdbrooks

    (@rwdbrooks)

    First – Thanks for getting back to me and being so responsive!

    So, I did that and it thinks for a min, but does go to the admin page. Trying to put just the home page or any other page in the URL though does redirect back to the wp-login screen. Any other page seems to work as well, just not the homepage.

    If that’s the issue, I’m not sure how to affect the buddypress/kleo theme pop-up login that comes after the activation email.

    Plugin Author Kevin Vess

    (@kevinvess)

    No problem!

    hmm.. ok –?well, it sounds like the redirect issue isn’t caused by Force Login since you’re able to get into the admin page after the first login.

    One other thing you could test is to change your theme from Kleo to one of the default Twenty-something themes to see if the issue is caused by the theme.

    If the issue is still there after trying with the default Twenty-something theme; then you could try disabling all the plugins except BuddyPress and Force Login to be sure it’s not caused between those two. Then activate each remaining plugin one-by-one, checking to see if the issue occurs after each plugin is activated.

    Good luck!

    rwdbrooks

    (@rwdbrooks)

    Alright, I thought so as well, but thought I’d see. Thanks!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Email Register Link Not Working’ is closed to new replies.