User Sync - Skip 2 specific ID's for sync

Hello
I have a special use case where I have 3 user ID's which have the same email address. I forced the backend to accept the same email for all 3 users.

I am syncing these ID's along with other ID's on this site to a subsite. I keep getting a sync error because of these ID's.

Is it possible to skip the sync for these ID's?

Best Regards,
Vamsi

  • James Morris
    • WordPress Enthusiast

    Hello Vamsi Pulavarthi,

    I hope you are well today.

    I'm afraid there's no setting or quick code snippet to accomplish this. Checking the plugin code, you would have to edit the core plugin code in several places in order to accomplish this. Of course, this is not a recommended approach as any future updates to the plugin will cause these changes to be lost.

    The simplest and recommended approach would be to setup simple email aliases (forwarders) for the users in question so that the same email account can be used, but User Sync and WordPress in general will see unique email addresses. I do this on a number of my sites. It works quite well.

    For example:

    In Google Apps I setup a number of aliases to go to wpmudev@mydomain.com, like so:

    devtest1@mydomain.com -> wpmudev@mydomain.com
    devtest2@mydomain.com -> wpmudev@mydomain.com
    devtest3@mydomain.com -> wpmudev@mydomain.com

    And so on...

    This allows me to have unique IDs and Emails for testing, but use the same inbox. Since most email providers and hosting accounts will allow setting up forwarders or aliases, this would be your best approach for setting up sync without causing issues.

    I hope this helps!

    Best regards,

    James Morris

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.