WordPress.org

Ready to get started?Download WordPress

Forums

Restrict SITEWIDE Access to Group of Users? (2 posts)

  1. Driftless
    Member
    Posted 4 years ago #

    Greetings -

    Scenario: I have a functioning single-site install of 3.0 with a few thousand users. I am creating a multi-site "member" install that is linked to this one. (I'm sharing the users table and cookies etc for seamless login)

    Need: I want to grant access to the new site to a small group of users. They can be picked by a) user meta flag, OR b) role/capability, OR c) whatever.

    Trick: I don't want to restrict access to certain pages / posts, but EVERYTHING including Buddypress, and other internals.

    In short, is there a simple function / hook that says: only allow logged in users with some flag access to the whole site.

    Thanks for the advice

  2. Driftless
    Member
    Posted 4 years ago #

    It occurs to me the question might be unnecessarily complex. I know how to share user/user_meta tables between sites. So the kicker is this:

    How do I grant SITEWIDE access (including Buddypress, etc) ONLY to registered users who are ALSO flagged in the user-meta table as "member."

    If both sites are sharing a user table, then the first can just ignore that flag while the second checks for the usermeta flag on every page / post / menu / area / everything.

    Cheers!

Topic Closed

This topic has been closed to new replies.

About this Topic