Default Membership Level for loggin in users (not members)

I have a WPMU network with several thousand blogs and several thousand users and want to have one of my blogs act as a support site. I need to protect some intellectual property from the general public, so my hope is to have the general Web viewing public able to visit the blog, but have some content protected inside of shortcodes.

My testing of the membership plugin seems to work perfectly: configuring the stranger level, member level, shortcodes, rules, default subscriptions, etc… except it appears that I can’t have a person added to a “logged in member” level unless they are actually a member of that specific blog. I would prefer to only test if they are logged into the WordPress instance, not set as a member of the support blog. Is that possible?

  • DavidM
    • DEV MAN’s Mascot

    Hi edutech,

    Hmm, not sure I understood that correctly but the users would have to be members of this support blog (meaning they’d have to have at least a subscriber role) in order for membership levels to be applied to them.

    You could always use the membership level specified as the Stranger to apply rules to them but that would apply just the same to the public.

    Would that work for you?

  • edutech
    • New Recruit

    Hi David,

    I would like to protect some content on this blog from the general public, but hoped that if people were logged into WordPress, that the membership level could depend on the fact they were authenticated, not that they were members of the blog.

    I want to avoid adding people as members of the blog because there will be thousands of them, and I am hesitant to have the support blog automatically show up on “My Blogs” for everyone, when only a small percentage may need that content.

    Is there a way I can inject a membership level into a user account outside of the Membership plugin UI? If I were to add a routine to my LDAP->WP Account creation system so that when a person logs into WP, their membership level on the support blog were programmatically set, what would that look like? I assume it is just stored in a table somewhere with the userID, blog ID, membership level, etc….

  • Barry
    • DEV MAN’s Mascot

    There really isn’t any difference, as far as the membership plugin is concerned, between wordpress users and members. In fact there isn’t actually a members table in the plugin, it uses the users one.

    A user who has an account but not a subscription (or level assigned) is treated as a “stranger” the same a someone without a user account. Anything else is a member whether they have a subscription, or have been assigned a level in the admin area.

  • Barry
    • DEV MAN’s Mascot

    and I am hesitant to have the support blog automatically show up on “My Blogs” for everyone, when only a small percentage may need that content.

    If they don’t have it listed in their My Blogs, then they have no permissions to it and I don’t think they can log in to it.

  • edutech
    • New Recruit

    Hi Barry,

    Thanks for the response and I understand what you mean about the Membership plugin’s use of the User table. I was just hoping for a workaround to check for an authenticated user, which on a multi-site installation is not equivalent to being a subscriber to a particular blog, nor does it necessary restrict a user’s access to any particular blog, unless that blog’s privacy settings require a subscription.

    I do want to give you a lot of kudos, though! I really like the functionality of this plugin and it may work very well for a different, much more difficult problem I have to solve.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.