Support » Networking WordPress » Restrict Access to a MU sub blog

  • We are running 3.0 MU for our Boy Scout Council, and have 10 blogs (sites). One sub blog needs to be restricted. Only certain members should be able to access the entire blog (only the Executive Board Members).
    Does anyone know of a plugin that will allow this?
    I looked at the User Access Manager plugin, but it seems to only be able to restrict certain pages or posts.
    Thanks.

Viewing 13 replies - 1 through 13 (of 13 total)
  • This plugin might help with what you’re seeking, as it allows you to configure private blogs. It’s a premium plugin though.

    Multisite Privacy

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    Lead Plugin Wrangler

    Make it private (or rather ‘public = no’) and add the users manually?

    This post touches on it: http://www.problogdesign.com/how-to/build-a-client-development-site-with-wordpressmu/

    It looks like the More Privacy plugin may do the trick.
    We really want users to register at the main blog, and then let us select which users can see the restricted blog.
    It appears right now, a user would have to be registered on each individual blog, including the restricted blog. Does that make sense?

    Thanks!

    Andrea Rennick

    (@andrea_r)

    Customer Care at Copyblogger Media and Studiopress

    http://wordpress.org/extend/plugins/more-privacy-options/
    http://wordpress.org/extend/plugins/network-privacy/

    Either one of these give tons of options. Like

    – to view this blog, a user must be signed up to the network

    or

    – to view this blog, a user must be signed up to the network AND be listed as a member of this blog.

    We really want users to register at the main blog, and then let us select which users can see the restricted blog.

    This is pretty much how it works out of the box with one of the plugins above. (which was the plugin referenced in the link given by Ipstenu, except this plugin download link works).

    Excellent, Network Privacy worked like a charm.
    Still trying to figure out how to:
    1) add an existing user to that sub-blog. Say User1 registered at root blog. He defaults to a subscriber. I want to give him access to the protected sub-blog. How do I add him?
    2) add a link on the main blog for the member-only blog that only shows up if the user is logged in and has access to the member-only blog. Is that possible?
    Thanks!

    Andrea Rennick

    (@andrea_r)

    Customer Care at Copyblogger Media and Studiopress

    1 – go to Super Admin -> Sites, find the site, click “edit”. Look on the lower right and there’s a section to add a user to that blog/site.

    if it;s not the super admin, the administrator can go to the Users menu in the backend and add existing users from there, as long as the Super Admin -> Options page has the option “allow users to add users” is checked.

    1. Thanks! I see that option. If they have already registered, how do I add them to the sub-blog? Just type in their username in the Add User?

    2. Do you know how to make a link appear if the user is logged in and has access to a member-only blog?

    Thanks!

    Andrea Rennick

    (@andrea_r)

    Customer Care at Copyblogger Media and Studiopress

    1 – yep.

    2. wrap it in the is_logged_in function. 🙂
    http://codex.wordpress.org/Function_Reference/is_user_logged_in

    Very nice…I’m getting close:

    <?php global $current_user; get_currentuserinfo();
     if ( is_user_logged_in() ) { ?>
     <a href="/LINK TO PROTECTED BLOG">PROTECTED BLOG</a>
     <?php  }; ?>

    This sorta works…Guests don’t see the link, but ALL register user see the link. I need to limit it to only users in the protected blog.
    Is that possible?

    Try
    is_user_member_of_blog( $user_id, $blog_id )

    from wp-includes/ms-functions.php

    Getting closer….

    <?php
        global $current_user;
        get_currentuserinfo();
        if(is_user_member_of_blog($current_user,20)){
            echo 'Member Only Blog Link';
        } else {
            echo 'No Access';
        }
      ?>

    No matter what user is logged in, the No Access is returned. All I could find as far as help was:
    http://codex.wordpress.org/WPMU_Functions/is_user_member_of_blog

    Thanks for all your help!

    Got it!
    Thanks for all the suggestions and help!

    $user_id = $current_user->id;

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Restrict Access to a MU sub blog’ is closed to new replies.