1. Home
  2. Docs
  3. WCAP – WHMCS Client Area API
  4. Learning More
  5. Single Sign-on with WordPress – SSO (Advanced Settings)

Single Sign-on with WordPress – SSO (Advanced Settings)

To use Single Sign-on feature, navigate to WCAP > Advanced Settings > SSO Settings (tab)

This feature comes in handy, if you want your WordPress users to able to login to WHMCS and make purchases or if you need your WHMCS users to comment on WordPress blog posts or for example, use support forum bbpress without additional login to WordPress.

This is achieved by synchronizing the user profiles & passwords between WHMCS and WordPress.

As sharing and keeping user profiles synced between two different CMS comes with extra management overhead. It is advised to use this feature only if you have a pressing reason for it.

 

 

SSO Settings

Enable WHMCS-WP SSO: Check to let users log in to both WordPress and WordPress.

Hide WP Admin bar: WordPress shows admin bar at the top for logged in users, check this option if you want to hide it. Since most of the time users will be using a logout link in menu page provided with “WHMCS Client Area”, you can check this option to hide admin bar.

Exclude WP roles from SSO: Check the roles to exclude from SSO process.

Sync Address / Profile Fields: By default, WHMCS requires address fields for user creation, while WordPress doesn’t. WCAP create these fields in WP. Check to create WHMCS profile fields (address, phone number etc), in WordPress.

WHMCS-WP profile fields mapping: Users who are already using address/profile fields from another plugin can map those fields with WHMCS fields

SSO Sync Settings

SSO works by synchronizing user profiles and passwords in WHMCS and WP. Following options are related to how new users are created and existing are synced in between WHMCS and WordPress when SSO is enabled

 

Settings to create users in WordPress

These settings come into play, when a new user signup in WHMCS, and it is synced to WordPress.

Role for the new user: A WordPress role for the new user.

Username for the new user: In WHMCS email is used as user-id, while in WordPress uses the username. You have two options here to make usernames.

  • First Name + Last Name
  • Use email as username (recommended)

 

Settings to create users in WHMCS

These settings come into play, when a new user signup in WordPress, and it is synced to WHMCS.

WordPress has fewer profile fields than WHMCS, settings in this section handle how to fill WHMCS fields.

By default, WHMCS requires Client Address and Phone Number for user creation, while by default WordPress does not collect this information.

You can handle this situation in two ways.

  1. Allow Sync to add dummy data to the WHMCS Client Area Address & Phone numbers fields.
  2. Leave empty fields as its
Note: If you select 2nd option, you can also consider the option to disable these fields within WHMCS. To do that go to WHMCS > Setup > General Settings > Optional Client Profile Fields > and mark all fields as optional other than First Name and Last Name.

One Time Sync

When SSO has enabled, new users and profiles changes are tracked and syncs users between WHMCS and WordPress. For the existing users (those are created before SSO is activated), you need to run sync process below. This is a one time task and is needed for a smooth SSO experience.

 

NOTE: This step is needed where you have a working WHMCS or WordPress installation with users configured and a new WordPress installation.

 

Sync.Direction: You can run sync users from WHMCS to WP or from WP to WHMCS, or both ways to suit your needs.

Was this article helpful to you? Yes 2 No 2