Membership 2 on multisite handle new users

I have a multisite and each blog is using Membership 2. But the registration isn't very smooth for users who already registered on another blog. For example... A users registers on blog1.mysite.com and then finds blog2.mysite.com and decides to register... They get an error that someone with their email is already registered... They think... "No I didn't..." How can we make this smoother. Can't we just add that user to the blog instead of giving an error?

  • Huberson
    • Recruit

    Hello fonderco
    This behavior is because of the way users are handled on multisite by default in WordPress.
    Quoting a colleague

    That's standard WordPress restriction.
    All multisite users are network users. So each user is a network user and have access to the network, all adding a user to a subsite does is give them a user role on that subsite.

    ie. all subsites share the exact same wp_users table, but until they are added/registered on a subsite then they effectively do not have a user_role on that subsite therefore are treated the same as a visitor until added.

    If the user is logged in to the sub-site she's already registered(blog1.mysite.com), accessing the other sub-site(blog2.mysite.com) registration, and using the signup button should allow her to login to the site and signup for a membership.

    Also, if you want to signup the user to multiple sub-site, using WordPress User Sync plugin might be an option.

    Regards,
    Huberson

  • fonderco
    • Design Lord, Child of Thor

    I understand that... But here is my issue.

    User1 makes an account on blog1.mysite.com. They then go to blog2.mysite.com. They have not registered. Have not done anything.

    They click the register button. They attempt to register. They get an error saying that email has already made an account. Wait, what? They have never been to blog2 before.

    I look under "Users" and "Membership 2 -> All Members" and "CoursePress Pro -> Students" and i can't find User1 anywhere. They don't exist on blog2.mysite.com.

    But, they can login using their blog1.mysite.com password.

    Membership 2 shortcode knows who they are on blog2 even though they haven't registered.

    What is going on???

  • Kasia Swiderska
    • Support nomad

    Hello fonderco,

    This is how WordPress Multisite works. If you disable Membership 2 Pro on your subsites and use default WordPress registration and login form you will have exactly the same result.
    This is because in WordPress Multisite every user is registered for the whole network and that means that they can log in on each subsite of Network using the same account and will not be allowed to register twice.

    Here is plugin https://wordpress.org/plugins/network-subsite-user-registration/ that will override that - it will allow registering user only one subsite, so they will be able to register on other subsites without the error.

    kind regards,
    Kasia

  • fonderco
    • Design Lord, Child of Thor

    That plugin doesn't work. Users still get the same error.

    "That username is already taken, sorry. That email address is already taken, sorry."

    Even though that email/user has never signed up for any membership on this subsite.

  • Simplebutcreative Media
    • Site Builder, Child of Zeus

    +1

    I'm run a couple multisites and curious about using Membership 2 network activated. I've heard of the plugin above but have never used it.

    I wonder if that plugin will work with Woocommerce. Do you guys think I'll get the same username error if a customer signs up for an account through one my customers subsite using woo?

  • fonderco
    • Design Lord, Child of Thor

    I was thinking I would need to hook into the MS_Model_Member::create_new_user() function somewhere?

    Maybe the “wpmu_validate_user_signup” filter?

    Basically, if a user tries to register on 2 different subsites the plugin will allow add their existing user to the second subsite and notify them.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.