'Sorry, that email address is already used!’

Hi there,
I have a multisite with two very different webshops (let's call them SITE1 and SITE2), however now I have a few users on SITE1 who also want to buy items on SITE2 (and vice versa), but they get this error when they try to sign up:

'Sorry, that email address is already used!’

I guess this error occurs because it is a multisite, but obviously it should be possible for customers to sign up as users to both sites individually.

What is the workaround for this?

  • Maria
    • Design Lord, Child of Thor

    Follow up to what I wrote: I guess this error occurs because it is a multisite and hence the email already exists in the user table. but obviously it should be possible for customers to sign up as users to both sites individually as they have no idea the two sites are part of a multisite.

  • Kasia Swiderska
    • Support nomad

    Hello Maria,

    What are you using for users to signup? Default WordPress signup form or one from your store?
    What you are describing looks like default WP multisite form - and this is happening because all the registration is done on the main site of the network.
    But using form from plugin (like WooCommerce) should allow you to avoid that behavior.
    Another reason for that could be plugin for managing users in Multisite - they are creating users on all the subsites when user registers first time - do you have that type of plugin?
    Let me know

    kind regards,
    Kasia

  • Rupok
    • Support Ninja

    Hi Maria,

    As a workaround, you can use our User Sync plugin. With user sync, if your users sign up on Site1 (set as the master site), their account will be synced to all other subsites set as "Sub". So your users won't have to sign up on each site individually.

    You will get full usage guide of this plugin here: https://premium.wpmudev.org/project/wordpress-user-synchronization/#product-usage

    I believe, this will help you in this scenario. Please let us know if it doesn't or if you have any confusion. We will be glad to help.

    Have a nice day. Cheers!
    Rupok

  • Maria
    • Design Lord, Child of Thor

    Hi again,
    I tried to add the snippet from here:

    http://wordpress.stackexchange.com/questions/75565/how-to-use-same-email-for-multiple-users/75697#75697

    ... and it worked in regards to signup. A customer can now sign up to both sites individually and I see the email connected to a user on site 1 and site 2.

    BUT: Lost password request for this new user does not work on site2 (I signed up first on site1). It says: "Invalid username or e-mail." On site1 user can easily reset password.

    Any ideas?

  • Maria
    • Design Lord, Child of Thor

    Follow up: Apparently it does not accept the email address, but it does accept username (a username customer never sees as they use their email as login. In this case the username is tatjana_h_3, but only I as an admin can find this in the users profile) – how to fix this?

  • Maria
    • Design Lord, Child of Thor

    Follow follow up:

    A customer has signed up as a user on site 1 with her email. Sign in works perfect with her email address and password.

    However same person now wants to sign up to site 2 and she signs up with her email once again. This is also fine and it works. BUT: When she signs out of site2 the first time and wants to sign in again it says that password is wrong for the email: "The password you entered for the username xxx is incorrect. Lost your password?”

    But password has not been changed and password is actually not the issue here, because it appear I can log in with her username (a username the customer never gets as she uses her email to log in) and the same password as always.

  • Maria
    • Design Lord, Child of Thor

    Hmm. As mentioned the websites are very different, let's say cupcakes and cars so it makes no sense for the car interested to have access to cupcakes and vice versa.

    There must be some possibility for users to sign up to both sites with same email address. The customer does not know it is a multisite...

  • Maria
    • Design Lord, Child of Thor

    Hi Rupok,
    It did the trick, thank you! However with Woocommerce signup's it didn't work – but adding this snippet it did:

    Woocommerce has wc-user-functions.php which checks to see if the email exists already. This plugin can work if the file is modified so that the check is removed. I’ve successfully did it and it works with the username generated by WooCommerce (although it should work without it being generated). There’s one line in wc-user-functions.php which is the culprit.

    Instructions
    1. You’ll first need to go to /wp-content/plugins/woocommerce/includes
    2. Open file wc-user-functions.php in that directory
    3. Change the following

    FROM:
    if ( email_exists( $email ) ) {
    return new WP_Error( 'registration-error-email-exists', __( 'An account is already registered with your email address. Please login.', 'woocommerce' ) );
    }

    TO:
    if ( email_exists( $email ) ) {

    }

    4. You’ll need to do this every time you update WooCommerce.

  • Rupok
    • Support Ninja

    Hi Maria,

    Glad to see that you could make it work, finally. Thanks for confirming.

    Also thanks for sharing the workaround with WooCommerce. This will help others having similar type of requirement in the future. I really appreciate this.

    Please let us know if you have any further query. We will be glad to help.

    Have a nice day. Cheers!
    Rupok

  • Kasia Swiderska
    • Support nomad

    Hello Maria,

    it works great for new users, but when updating Woocommerce and re-adding the snippet all users that signed up prior can not log in and/or reset password. Ouch!

    Are there any errors when they try login or reset passwords? Could they login no problem before Woocommerce update?

    kind regards,
    Kasia

  • Maria
    • Design Lord, Child of Thor

    Let's go back to what we are after and start again:

    We would like that a customer can sign up (and sign in) with same email address + same password on site1 and site2 in multisite (Woocommerce) – as if they were two separate websites.

  • Rupok
    • Support Ninja

    Hi Maria,

    So sorry to hear the inconvenience. Let's try one more time.

    Can you please tell us exactly what changes are done already? You confirmed that this plugin "https://wordpress.org/plugins/allow-multiple-accounts/" is working for your WordPress signups but not for WooCommerce signups. So I believe, you are keeping it for WordPress native signup.

    Then you said the snippet from here (http://wordpress.stackexchange.com/questions/75565/how-to-use-same-email-for-multiple-users/75697#75697) along with the workaround mentioned here (https://premium.wpmudev.org/forums/topic/sorry-that-email-address-is-already-used#post-1210944) is working for signup If I'm not wrong. That means, after these three steps, your users can signup in both WordPress native way and in WooCommerce. Can you please confirm?

    And now, you are facing that your old users can't reset their password?

    You said "re-adding the snippet", which snippet did you refer to? This one? http://wordpress.stackexchange.com/questions/75565/how-to-use-same-email-for-multiple-users/75697#75697

    If yes, then I'm not sure why you need to re-add this. You should be using that snippet in either your functions.php file in your currently active theme, or by creating a MU Plugin. To get more idea on mu plugins, you can go through this article: http://premium.wpmudev.org/manuals/wpmu-manual-2/using-mu-plugins/

    So I don't think you will need to re-add that snippet if you add that code with a MU Plugin. It will stay even though you update WooCommerce or WordPress itself.

    Now about the "wc-user-functions.php" file editing, you need to do this every time you update WooCommerce. As you said after updating WooCommerce, your old users can't reset password. Can you please confirm before updating WooCommerce your old users could reset their password without any problem?

    Please let us know all these details. I'm looking forward to hearing from you and resolving this issue as soon as possible.

    Have a nice day. Cheers!
    Rupok

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.