Complicated Scenario with Membership Plugin

Hello to the team!

I would some help about a scenario. Here it is:

I have a multisite with the membership plugin. The members can register through the main site. Then I would like to add every user to a new blog with a specific user role which is the same when Memebership plugin give it to him at the registration process.

My question is, if the membership expires and the member doesn't pay, how can I restrict the access to the blog he is also a user.

With some test I did, I saw that if I disabled him through Membership (or move to a no subscription plan), he cannot log in into the main site but he can login in the blog.

I would like to restrict his access everywhere in the network!

How can I do it?

  • Vaughan
    • Support/SLS MockingJay

    Hi @electroasd,

    You would need to network activate membership to begin with.

    Then try adding these lines to your wp-config.php file.

    define( 'MEMBERSHIP_GLOBAL_TABLES', true);
    define( 'MEMBERSHIP_GLOBAL_MAINSITE', 1);

    Where 1 is your mainsite ID.

    Once done, membership rules should then affect every blog on the multisite.

    You can use a plugin called 'join my multisite' to automatically add all users to every blog on the network.

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

    I'm not entirely sure it will give the same user role as membership does depending on the subscription plan. But it's a start.

    Hope this helps.

  • electroasd
    • The Incredible Code Injector

    Thank you @Vaughan !

    The thing is that I do not want every user being user in every blog.

    I have already add these lines in th wp-config, but nothing happens.

    When I disable a user, he cannot login into the main site, but he can login to the blogs.

    For example if a disabled user (from Memebrship plugin) tried to login at the mainsite.com/wp-admin he receive a message that he cannnot login.

    If he tries to login at a blog of the multisite mainsite.com/blog1/wp-admin , he can login.

    If I solve this, I think I solve my problem...

    Any help or idea is totally accepted!

  • Vaughan
    • Support/SLS MockingJay

    Hi,

    how are you disabling the member? I'm sure that membership just blocks their access to content when their subscription ends, but they should still be able to login as their account isn't actually removed, and it allows them to renew their subscription?

    Let me just ask the developer for some feedback on this, as i'm not sure if it will actually work the way you suggest, or whether this might be another bug in the works.

    Thanks.

  • electroasd
    • The Incredible Code Injector

    Thank you @Vaughan !

    I disable the members or move down a subscription through the Membership Backend panel inside Multisite settings.

    The problem I think is that I am add the users manually to the blogs I want and the system of Memebrship doesn't update about that.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.