User Synchronisation
This plugin provides automatic synchronisation between the user accounts stored in the AudiencePlayer backend and those
stored in the Wordpress website. This functionality is required for most of the features this plugin provides, such as
3rd party payments and entitled/purchased video content. Before enabling it, please pay close attention to the following
notes:
-
Begin by configuring the credentials that you have received via support@audienceplayer.com,
in the configuration section {{SECTION_CONFIGURATION_TAB_API_TITLE}},
you can activate user synchronisation there as well.
WARNING: When activated, all user actions taken such
as deleting a user in Wordpress, will immediately be applied to the AudiencePlayer backend!!! Keep this in
mind especially while still testing/developing in your Wordpress environment!!!
-
If you enable users to register via another channel than the website (e.g. TV-apps, mobile apps etc), then
contact AudiencePlayer to ensure two-way synchronisation is
enabled for your account. That ensures that users will also be able to login via the Wordpress website.
-
When activated, moderators may inspect the synchronisation status per user and
re-synchronise accounts as well.
-
When activated, any Wordpress user (including admins!) can ONLY login with e-mail address and password (username
will NOT be accepted).
-
When NOT activated, users will NOT be synchronised and after logging into Wordpress, may encounter problems
using certain features such as product/subscription purchase, playback of purchased/entitled videos etc. This
can result in error messages such as "user not synchronised" or error code "407".
-
Besides e-mail, password, first_name and last_name, you may wish to collect additional user metadata in
Wordpress e.g. during registration, such as birthdays, address etc.
A The following meta properties (in the user_meta table) can be synchronised with the AudiencePlayer backend, if
you conform to the following property names:
- address: string value containing the address/street name, e.g. "Bakerstreet 123"
- postal_code: string value containing the postal/zip code, e.g. "1245CT"
- city: string value containing city name, e.g. "Amsterdam"
- country: string value containing two-digit country code, e.g. "NL"
- gender: string value containing the gender, supported values: ["male", "female", "non_binary",
"unknown"]
- height: numeric value containing the height in centimeters (cm), e.g. "185"
- weight: numeric value containing the weight in kilograms (kg), e.g. "75"
-
Developers note: There are many Wordpress hooks addressed by this plugin to achieve redundant User
synchronisation. If you use code and/or other plugins that affect user management and/or authentication, the
hooks listed below deserve special attention should you use them as well. For a thorough overview, see the
plugin file "BootstrapTrait.php" for the exact implementation.
- user_register: synchronise user, add user
- email_change_email: synchronise user
- user_profile_update_errors: synchronise user, create user
- registration_errors: synchronise user, create user
- delete_user: synchronise user, delete user
- deleted_user: synchronise user user