WordPress.org

Ready to get started?Download WordPress

Forums

Restrict Access to a MU sub blog (14 posts)

  1. fuzzie
    Member
    Posted 3 years ago #

    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.

  2. Person
    Member
    Posted 3 years ago #

    This plugin might help with what you're seeking, as it allows you to configure private blogs. It's a premium plugin though.
    http://premium.wpmudev.org/project/sitewide-privacy-options-for-wordpress-mu

  3. 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/

  4. fuzzie
    Member
    Posted 3 years ago #

    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!

  5. 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).

  6. fuzzie
    Member
    Posted 3 years ago #

    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!

  7. 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.

  8. fuzzie
    Member
    Posted 3 years ago #

    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!

  9. 1 - yep.

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

  10. fuzzie
    Member
    Posted 3 years ago #

    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?

  11. David Sader
    Member
    Posted 3 years ago #

    Try
    is_user_member_of_blog( $user_id, $blog_id )

    from wp-includes/ms-functions.php

  12. fuzzie
    Member
    Posted 3 years ago #

    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!

  13. fuzzie
    Member
    Posted 3 years ago #

    Got it!
    Thanks for all the suggestions and help!

  14. David Sader
    Member
    Posted 3 years ago #

    $user_id = $current_user->id;

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.