User allocation with Protected content and Pro Sites

Hi,

Currently in test mode. I have a number of sites allocated through Pro Sites registration.

I have only 1 member in Protected Content.

When I try to create an new member account within Protected Content using a email connected to a registered Pro Site it give an error" That email address is already taken, sorry.
http://screencast.com/t/mk559jxoGNi

Please advise.

Thanks,
Justin

  • Predrag Dubajic
    • Support

    Hey @Justin,

    Hope you're well :slight_smile:

    This is actually not related to Protected Content, this is just how multisite network works.
    All users are network and same username or email can't be used multiple times across different sub sites.

    Let me know if I can help you some more with this.

    Best regards,
    Predrag

  • Justin
    • The Crimson Coder

    Hi Predrag,

    I would like users who sign up for a pro site to get free access to the help area which is a Protected Content members area:
    http://help.myreikipractice.com/members/help/

    The problem I am getting at the moment is a customer who has bought a pro site and then tries to register as a free member for the help area here:
    http://help.myreikipractice.com/register/, gets the error message that the email address is already taken as they are already in the system. So how do they get access to the the members areas?

    Everything is set up (Pro Sites and Protected Content) with myreikipractice.com which is a Multisite installation. (So yes these are sub site visitors/customers).

    Thanks,
    Justin

  • Predrag Dubajic
    • Support

    Hey Justin,

    When using multisite setup users can only register once on network since all accounts are kept in one place.
    What should work for you is creating Default Membership in Protected Content and restrict access to support page for that membership, your sub site owners should now be able to access that page with the account they created when purchasing a site.

    Let me know if this works for you.

    Best regards,
    Predrag

  • Predrag Dubajic
    • Support

    Hey @Justin,

    Sorry for the delay here.

    Pro Sites is a network activated plugin and when users register their site they will get their user account that is also used on your own site.
    Protected Content is plugin that needs to be configured for each sub site where you want to restrict access to certain content.

    So if your main site is domain.com and user registeres for new sub site site.domain.com he will now how account on domain.com
    You will now need to setup Protected Content on domain.com with new membership which will have access to support.
    Sub site admin will still need to register for that membership with their current account by going to domain.com/memberships/ or any other page you set to list your memberships.

    After the existing user signs up for your membership he will now have access to pages you have protected.

    Also it's not just one page I want to give them access to but a subdomain.

    Do you want to disable access for members to all other subsites in the network except for his sub site and main site?

    Best regards,
    Predrag

  • Justin
    • The Crimson Coder

    Hi @Predrag,

    Thanks, I was aware of this.

    Sub site admin will still need to register for that membership with their current account by going to domain.com/memberships/ or any other page you set to list your memberships.

    After the existing user signs up for your membership he will now have access to pages you have protected.

    What I would like to understand is how to do the above?
    When users try to register they get an error that the email address is already taken so how do they get access to the membership account?

    Can they use their login and pw they are using from their registration through Pro Site or is should it be done differently?

    Thanks,
    Justin

  • Predrag Dubajic
    • Support

    Hey @Justin,

    Ok, we are getting there :slight_smile:

    Once your users are registered and logged in they should be immediately redirected to payment page ( if protected content membership requires payment ) or just show show confirmation message that they are now added to that membership ( if free membership ).

    I have tested this on my installation and it worked in the way described above.

    If your users are still asked for registration even when logged in would you mind granting me support access so I can have a look at your current setup?
    To enable support access you can follow this guide here:
    https://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Best regards,
    Predrag

  • Justin
    • The Crimson Coder

    Hi @Predrag

    Once your users are registered and logged in

    to their Pro site or the membership site?

    ( if protected content membership requires payment )

    This membership site is free.

    I'm not yet understanding the path/flow from Pro sites through to member ship.

    Also, still would like to understand if they can use their login and pw they are using from their registration through Pro Site or is should it be done differently?

    Thanks!
    Justin

  • Michael Bissett
    • Recruit

    Hey @Justin,

    On looking at your setup here, I noticed that you have the Pay to Blog module enabled inside of Pro Sites, which helps us out here. :slight_smile:

    As it sounds like the member isn't being added as a member to your help site upon registration, we can try using a function like this to ensure that when a user registers for a site on your network, they'll be added as a user to your help site:

    function create_account_on_help_site($blog_id, $user_id) {
    	if ( is_user_member_of_blog ( $user_id, 29 ) ) {
    		return;
    	}
    	else {
    		add_user_to_blog( 29, $user_id, 'subscriber' );
    	}
    }
    add_action( 'wpmu_new_blog', 'create_account_on_help_site', 10, 2 );

    You'd want to add that in as a mu-plugin, you can learn more how to do that by checking out this article:

    http://www.newnine.com/learn/how-to-create-a-wordpress-mu-plugin

    Let me know if this helps please! :slight_smile:

    Kind Regards,
    Michael

  • Justin
    • The Crimson Coder

    Hi @Michael,

    With a new email and after clearing the cache in another browser I created a new Pro site. With this username and pw I tried to access the help.myreikipractice.com membership area but it gave me this error

    The content you are trying to access is only available to members. Sorry.

    Then I tried to register for the membership area as a new user and it then said:

    Your request to join the membership was successfully received!
    The Payment Gateway could take a couple of minutes to process and return the payment status.

    And it let me in to the members area

    If I try logging in again it does give me access so I guess it's working but the error messages are a little confusing.

    Justin

  • Predrag Dubajic
    • Support

    Hey @Justin,

    One thing I am wondering if I have set it up correctly so far, I have Protected Content currently setup on http://help.myreikipractice.com/ which is the site which should be protected.

    If you want to protect content on that sub site than this setup is correct, PC can be network activated but you will need to setup each sub site for content you want to protect.

    As for the notification text, you can use our Ultimate Branding plugin to make changes to notifications.
    https://premium.wpmudev.org/project/ultimate-branding/

    Best regards,
    Predrag

  • Justin
    • The Crimson Coder

    Hallo there,

    I needed to move my membership help site to
    http://help.yourreikipractice.com/

    This uses the updated Membership 2 Pro

    I put the above code in the MU-plugins folder in the same way as the first site - unfortunately when a user registers for a Pro Site now they are not added as a member.

    The only differences I can think of are
    - This version uses the new Membership and not Protected content
    - I have not yet protected the pages.

    I have given support access should it be necessary.

    Thanks!
    Justin

  • Michael Bissett
    • Recruit

    Hey @Justin,

    I put the above code in the MU-plugins folder in the same way as the first site - unfortunately when a user registers for a Pro Site now they are not added as a member.

    You mean to say that they're not registered as a user on that site, or do you mean to say that they don't have a membership on that site yet?

    If the former, then is the ID for that subsite any different from the one on your old site? The old subsite had an ID of 29, you'll want to see if this one has a different ID.

    If you go to:

    Sites -> All Sites

    And click on the edit link for a subsite, you should see the ID for the subsite, like this:

    http://mysite.com/wp-admin/network/site-info.php?id=2

    Please advise,
    Michael

  • Adam Czajczyk
    • Support Gorilla

    Hey Justin,

    I hope you're well today!

    Just to clear out things a bit: apart from the new issue that came up and is addressed with a new thread can we consider this one resolved? Please confirm. If so, could you please mark this one as resolved also?

    As for the new issue, we'll keep working on this with you in the other thread!

    Thanks,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.