• Resolved zlamczyk

    (@zlamczyk)


    I want a “closed” site. Only registered members may be allowed to view any part of the site. I’m currently using the Authenticate plugin to assist with this. The Authenticate program uses the following lines of code to accomplish this:

    public static function check_auth_to_read () {
    //If the current page isn't 'wp-login.php' or 'wp-register.php' redirect
    if ((strpos($_SERVER['PHP_SELF'], 'wp-login.php') === false) && (strpos($_SERVER['PHP_SELF'], 'wp-register.php') === false)) {
         auth_redirect();
         }
    }

    My issue is that no one can register for the site. Clicking the Register link from the site redirects back to the Login page. I’m pretty sure that the problem is that WPMU does not use wp-register.php for registration.

    Could anyone tell me how to allow registration while preventing any other part of my site from being viewed? I like the idea of redirecting back to the login page.

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘WPMU, require login to view any part of site, but allow registration’ is closed to new replies.