• Resolved Warford Designs

    (@warford-designs)


    Hi There, great plugin and I have loved the lock down it provides however I am having difficulty with one element.

    Here is the current process and where it goes wrong

    member registers – member receives email confirmation – member clicks on confirmation link – member is redirected to login page as opposed to confirmation page in order to activate the user account.

    I have tried adding the specific account confirmation page to the whitelist and have done so successfully for other pages however am hitting a road block on this one. Any assistance would be gratefully appreciated.

    here is the code I am currently using:

    // Begin Filter Force Login to allow exceptions for specific URLs.
    
    function my_forcelogin_whitelist( $whitelist ) {
      $whitelist[] = site_url( '/member-verification/' );
      $whitelist[] = site_url( '/member-registration/' );
      $whitelist[] = site_url( '/account-confirmation/' );
      return $whitelist;
    }
    add_filter('v_forcelogin_whitelist', 'my_forcelogin_whitelist', 10, 1);
    
    // End Filter Force Login to allow exceptions for specific URLs.
    
    // Custom Registration URL
    function my_registration_page( $register_url ) {
        return site_url( '/member-registration/', 'login' );
    }
    add_filter( 'register_url', 'my_registration_page', 10, 1 );
    
    

    Thank you in advance for all you assistance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Warford Designs

    (@warford-designs)

    I seem to have fixed my own issue, thanks to your great documentation on Github. I have tweaked my code and now all functionality is working as it should be. In case this will help others I have added the code that I ended up using, this allows me to whitelist both a specific page as well as other pages which utilize query strings which is exactly what I was needing. ?? Thanks again for a great contribution.

    Here is the code I used in the end.

    function my_forcelogin_whitelist( $whitelist ) {
      $whitelist[] = site_url( '/member-verification/' );
      $whitelist[] = site_url( '/member-registration/' );
      $whitelist[] = site_url( '/account-confirmation/?' . $_SERVER['QUERY_STRING'] );
      $whitelist[] = site_url( '/account-confirmation.php?' . $_SERVER['QUERY_STRING'] );
      return $whitelist;
    }
    add_filter('v_forcelogin_whitelist', 'my_forcelogin_whitelist', 10, 1);
    Plugin Author Kevin Vess

    (@kevinvess)

    Great! I’m glad you were able to get this resolved.

    Be sure to rate and review my plugin to let others know how you like it.

    Thanks for using Force Login!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Email Confirmation not activating’ is closed to new replies.