does m2 plugin network activated

Please clear up a potential miss understanding on my part.

Can m2 network activated control one set of member users for the network of sites OR Does it just make memberships in each mu site with each site having a set of members?

What i thought i could do is have one group of members that could access every mu site based upon the limits set by a network membership level not per site members.

  • Milan

    Hello Lee

    Hope you are well today and thanks for asking us. :slight_smile:

    What i thought i could do is have one group of members that could access every mu site based upon the limits set by a network membership level not per site members.

    I am sorry but this is making me confuse. Do you mind telling me staep by step flow you are expecting from Membership 2 pro's network feature ? That would be awesome to work with.

    Looking forward to hearing back. :slight_smile:
    Best Regards,
    Milan

  • Lee

    1. if i have a 50 (arbitrary) site multisite network.
    2. one membership level gold (example) that allows access to all content on any site (is this possible?)
    3. a gold member user logs in one time.
    4. that user member can see all authorized gold content on 50 sites.

    if the above can be done:

    where in the network does user live? network, root site or any site?

    where in the network is member levels managed? network, root site or any site?

  • Adam Czajczyk

    Hello Lee!

    You can use a single network activated Membership 2 Pro plugin to control access to any content across entire network. There are two requirements though:

    1. The Membership 2 Pro plugin must be set to work "network wide". To do this, please add following line to your "wp-config.php" file:

    define( 'MS_PROTECT_NETWORK', true );

    The only downside is that you'll need to setup all the memberships and protection rules once again. However this has to be done only once.

    2. You may need to use a plugin such as "Multisite User Management" to make sure that the members actually does have capabilities to access sites other than they registered for (so e.g. to automatically set them as "subscribers" for all sites at once).

    https://wordpress.org/plugins/multisite-user-management/

    These together would do the work, given the scenario you described.

    Best regards,
    Adam

  • Adam Czajczyk

    Hello Lee!

    m2 does not work unless all users are registered on site id1. Any user registered in a subsite are ignored by the network installed m2.

    This is why I suggested the "Mulitisite User Management" plugin in addition. In order to be affected by Membership 2 Pro protection rules/memberships on various sub-sites users must be able to access the subsite in first place. WordPress multisite doesn't work that way by default: by default user is able to access only the site he/she signed up for so even being a member of a "network wide" membership doesn't change it.

    Therefore, with aforementioned plugin you are able to set it the way users that are registering for one site automatically become users of other sites. Then they'll be affected by membership rule. Also, as I mentioned before, switching to "sidewide protection" (by adding the line to the "wp-config.php" file) basically "resets" current configuration so memberships and rules must be setup again (from scratch). As a result - existing member of "pre-existing" membership will not automatically get access. It should be considered like setting everything from ground up like Membership 2 Pro plugin was never there. This is stated in plugin's documentation on this page:

    https://premium.wpmudev.org/project/membership/#product-usage

    Best regards,
    Adam

  • Adam Czajczyk

    Hello Lee!

    The plugin I suggested is actually the same plugin that's suggested in document you linked to :slight_smile:

    As for "subscriber access". It seems that it's not stated on WP Codex page clearly enough. Let me please give an example workflow:

    - there's a clean/fresh Multisite install consisting of main site and three sub-sites and both sub-site and user account registration enabled
    - user goes to subsite A and clicks on "register" link
    - user is taken to /wp-signup.php page of a main site
    - user select "Just a username" please and registers

    After confirming an account user will be able to visit all the sites. Assuming he/she logged in he/she still will see the admin toolbar stating he/she is logged in and indeed will continue get access on a subscriber level. Yet, you won't find this users account on user lists of any other sub-sites (Dashboard [of a sub-site] -> Users -> All users) and won't be able to access dashboards of all sub-sites. This is when aforementioned plugin comes to place.

    As for M2. I'm a bit confused right now about the nature of an issue you're experiencing. As I mentioned before: if Membership 2 Pro was active before on your Network then after switching to network wide protection memberships and protection rules has to be setup again and users need to be signed up for these new memberships. Yet, I re-read the this statement of yours: "Any user registered in a subsite are ignored by the network installed m2. please check wirh developers on this.". It sounds indeed like an issue regardless of what I said before, so just to make sure:

    - the Membership 2 Pro is network activated
    - it's set to provide "network wide" protection
    - memberships and protection rules are set
    - users register on sub-sites

    Now those users are not affected by/included with network wide memberships. Am I understanding it correctly now?

    Kind regards,
    Adam

  • Lee

    codex article written 2 years ago after release 3 so a 2 yr old plugin not updated for 4.5 is just wrong to use ir recomend and it has less than 500 installs over 2 years. enough said.

    m2

    if you try to register after m2 plugin network activated with wp-config.php set installed the registration page defaults to site id1. so all network registrations on any subsite are actually rgeistering on site id1. the only way to put a user on a sibsite is admin add user on that site. that user will be ignored by m2. try it out.

  • Adam Czajczyk

    Hello Lee!

    if you try to register after m2 plugin network activated with wp-config.php set installed the registration page defaults to site id1. so all network registrations on any subsite are actually rgeistering on site id 1

    That's right, that's a regular WP behavior that works the same with and without Membership 2 Pro installed unless it's customized in any way (via a plugin or a custom code etc). There's another plugin that will automatically add users to the sub-sites:

    https://wordpress.org/plugins/join-my-multisite/

    Let me however explain one thing here: the "active installs" number currently is extremely misleading. In the past in WP repository you seen only the download number. At some point since 2015 those download counts are being reset (from what I know they weren't reset for all the plugins yet) and replaced by "Active installs" count which is calculated on daily basis with a 24 hours delay. Yes, it is the sum but there's no way to tell whether it started being calculated a year ago or a day ago.

    Both plugins that I suggested here are, despite what you can see, very popular and both work well.

    I understand though that you do not want to use them. It's absolutely not my intention to argue with that, I just wanted to explain the stats you quoted :slight_smile:

    Getting back to Membership 2 Pro. I tested this on my own test setup. I "messed" a bit earlier about the need for the user to be a user of a sub-site but the behavior on your site is not what's expected as well. Therefore I apologize for causing confusion and let me explain how it should be working by example:

    1. There's "site 1" (main site), "site 2" and "site 3"
    2. Membership 2 Pro is network enabled and set for site-wide protection
    3. a post (I'll call it further an "article") on "site 2" is protected by "M" (membership)
    4. two scenarios below

    a) visitor goes to an "article" on "Site 2" and cannot access it (because it's protected)
    - visitor click on "Register" link
    - visitor is taken to registration form on "site 1"
    - visitor signs up and select membership "M"
    - visitor now can access "article"

    b) visitor goes to "site 3"
    - visitor click on "Register" link
    - visitor is taken to registration form on "site 1"
    - visitor signs up and selects membership "M"
    - visitor now can access "article" on "site 2"

    Therefore, there's no need to add him/her as a user on to the "site 2" and he/she should be able to access content. However, this only applies to the "front-end" content and not any parts of admin area because not being a user of the sub-site he/she is not able to login to that sub-site.

    That being said, I misguided you (not intentionally) on the need of user being added as a user to all sub-sites and I apologize for this. I was however right sensing that your Membership 2 Pro installation is not working as expected because if the protected content is on front-end and user did signup for a side-wide membership he/she should be able to access that protected content side-wide regardless whether he/she is a registered user of a particular sub-site or not.

    Having said that all, would you mind if I tested this on your site and reviewed its settings? For this I'd need to access site's dashboard and you may allow me to do this by granting a support access as explained here:

    https://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    I won't make any changes to the site configuration without your prior consent, unless you allow me to before I access the site.

    Kind regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.