Skip to:
Content
Pages
Categories
Search
Top
Bottom

WPMU, require login to view any part of site, but allow registration

  • Avatar of Zachary Lamczyk
    zlamczyk
    Participant

    @zlamczyk

    WPMU 2.9.2
    BP 1.2.4

    I want a “closed” site. Only registered members may be allowed to view any part of the site. I’m currently using the Authenticate (http://wordpress.org/extend/plugins/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, ‘wp-login.php’) === false) && (strpos($_SERVER, ‘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 6 replies - 1 through 6 (of 6 total)
  • Avatar of piphut
    piphut
    Participant

    @piphut

    Is there a “register” link on the login page? If not, do you have “anyone can register” checked under wordpress admin> Settings > General?

    Avatar of Zachary Lamczyk
    zlamczyk
    Participant

    @zlamczyk

    The register link is present. When it is clicked, a user is redirected right back to the login page.

    Avatar of piphut
    piphut
    Participant

    @piphut

    can you post a link to your site? Also double-check to make sure admin panel > settings > general > “anyone can register” is checked just in case.

    Avatar of Zachary Lamczyk
    zlamczyk
    Participant

    @zlamczyk

    It is set to that.

    Thanks for your respond @piphut, but seeing my site is really not necessary.

    Registration is open to everyone. I have a different plugin that makes registration only active once an admin approves them. That makes registration managed by admin prior to a user having access. Problem with only this plugin is that the site can still be seen (like the members, forums, groups, areas).

    That’s why I installed the Authenticate plugin. When a user tries to go to “http://members.domain.net/members” they are redirected to the login page, wp-login.php. The plugin is also set to allow access to “wp-register.php” to allow registration. Well, the plugin is set to work with WP single user only because it’s set to allow “wp-register.php”. Issue is that WPMU does not use that file for registration. It uses an action direct to a part of wp-login, or something. I cannot figure out how to allow the Registration link to work under WPMU and the Authenticate plugin.

    Could someone offer a suggestion, please? I tried the More Privacy Options offered by WPU Dev, but that failed miserably, too.

    Avatar of piphut
    piphut
    Participant

    @piphut

    Try “registered users 2″ ( http://wordpress.org/extend/plugins/registered-users-only-2/ ). It is compatible with MU and buddypress. I use it for one of my sites. “Authenticate” looks like it is very very old (only tested compatible up to wp 2.5.2)

    Sorry I can’t help more :/

    Avatar of Zachary Lamczyk
    zlamczyk
    Participant

    @zlamczyk

    @piphut That plugin worked perfectly. Thanks for the suggestion! I can’t believe that I missed that plugin in the first place.

Viewing 6 replies - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.