Sync Users Between Sites

#Overview

If you have a sales site separate from your learning or membership site, you’ll need to keep users in sync between the two sites. You may also want to keep user passwords in sync, and enable single-sign-on, so users only have to log in once.

Because WP Fusion uses tags in your CRM or marketing automation platform to grant access to content, a tag applied on Site A can unlock content on Site B (or C, D, and E).

For example, a WooCommerce purchase applies a tag to the new customer on Site A, which then triggers an automatic enrollment into a LearnDash course on Site B.

#Setup and strategy

The main concern with syncing users between sites is keeping their passwords in sync, securely. For that reason we don’t recommend using WP Fusion to sync user passwords with your CRM, since they will be synced in plain text.

When you use your WP Fusion to sync users between sites, your user passwords end up stored in your CRM in plain text

Instead, we recommend using a plugin that allows you to sync user data directly between the sites, such as WP Remote Users Sync or Uncanny Automator.

It’s preferable to sync user passwords directly between your sites, and then WP Fusion can sync non-sensitive data such as tags with your CRM

In that scenario, WP Fusion can still connect both sites to your CRM, but it will just be responsible for applying tags and syncing other non-sensitive information.

#Using WP Remote Users Sync

Our recommended solution syncing users between sites is with the WP Remote Users Sync plugin.

It lets you connect your sites directly to each other, so new user accounts are immediately created on your membership site when a customer registers on your sales site.

It also enables single sign on, so customers don’t need to log in a second time on your membership site.

#Example

For example if you wanted to sell a product with WooCommerce on Site A, and deliver access to a course on Site B, you would first set up your WooCommerce product to apply an access tag via WP Fusion, and then in your course use that same tag for auto-enrollment (for example with LearnDash or LifterLMS).

You would then connect Site A to Site B using WP Remote Users Sync, and make sure that guest checkout is disabled in the WooCommerce settings.

Make sure that guest checkout is disabled in the WooCommerce settings on Site A.

Now, when the customer checks out, they will automatically be logged in to their new user account.

WP Remote Users Sync will sync the new user to Site B, along with their tags and logged-in status. This means the customer doesn’t have to log in again to access their course on Site B.

When the tags are loaded on Site B, WP Fusion will automatically enroll the new user into any courses linked to those tags, and record a message in the logs.

For more information on setting up WP Remote Users Sync, see our documentation.

#Using Uncanny Automator

Uncanny Automator allows you to set up a webhook between two sites which automatically creates a new WordPress user. You can use this to have your checkout on one site which automatically creates a user and enrolls them into a course on a second site.

For more info on using Uncanny Automator to sync users between sites, see this tutorial.

#Using WP Fusion

It’s also possible to sync user accounts between multiple websites with WP Fusion, using your CRM to store the data and push it onwards to multiple sites. This method is more advanced and requires additional setup, but doesn’t require installing another plugin.

#No user account

The simplest way to use WP Fusion to sync user data is to require guest checkout on your sales site. In this case WP Fusion syncs your customer data to your CRM, but no user account is generated on the sales site (so there’s no password that needs to be synced).

Then you can create an automation in your CRM that sends a webhook to Site B, with wpf_action=add in the webhook URL. This will create a new user account, generate a random password, and enroll the new user in any purchased courses or memberships.

This is quite secure because the password is randomly generated, and relatively easy to manage because once the user account has been created, the user only exists on that one site (you’re not trying to keep passwords and other details in sync on an ongoing basis).

#Syncing user accounts

Using WP Fusion it’s possible to sync a user’s user name and password to custom fields on their contact record in your CRM.

To do this enable the fields user_login and user_pass for sync from the Contact Fields tab in the WP Fusion settings, and select corresponding custom fields in your CRM in which to store the data.

You can then set up WP Fusion on a different WordPress site, and use WP Fusion to pull the latest user name and password from your CRM, effectively keeping your customer logins in sync across two or more WordPress sites.

#Setup

To set up the integration, first navigate to the Contact Fields tab and click the check boxes next to Password and Username to enable them for sync.

Then go to the General Settings tab and make sure the checkbox next to the Push option is checked.

Note: All data is synchronized with SSL encryption but passwords are stored in your CRM application as plain text. Make sure that everyone who has access to your application is trusted before you choose to synchronize passwords.

Now, when a user creates an account or updates their information, their username and password will be synced to to your CRM. You’ll then want to configure a webhook to push the information to the other site(s).

Was this helpful?