Skip to main content

Creating WordPress Users

WordPress users can be created in many ways; using only WordPress, using ActiveMember360 or by other third party plugins.

Important

When using ActiveMember360 it is best practice not to allow a WordPress user to be created using the default WordPress registration process.

Within WordPress, Settings, General, Memberships, Anyone can register should be disabled/unchecked.

This disables the WordPress registration link.

If you do allow a user to register using the WordPress registration link they will created as a contact within ActiveCampaign if they do not already exist and also as a user in WordPress with username and email address as submitted. The other WordPress user settings will be as detailed within Default WordPress User Settings when using ActiveMember360.

No standard WordPress new user login details email will be sent unless the contact satisfies the requirements to access the site as detailed within WordPress Login.

Using ActiveMember360

The main and recommended methods for creating a WordPress user when using ActiveMember360 are listed following.

Default WordPress User Settings

WordPress has four names for each user that may be used anywhere within a WordPress site:

  1. user_login (username)
  2. user_nicename
  3. display_name
  4. nickname

When ActiveMember360 creates the WordPress user the following defaults apply:

  1. user_login (username) is set to the email address

  2. user_nicename is set to first name last name with a hyphen as a separator, all lower case, based upon the values stored in ActiveCampaign.

    If no first name and/or last name is defined within ActiveCampaign, ActiveMember360 does not set a user_nicename and WordPress sets the user_nicename as the sanitised version of user_login.

    WordPress cannot have duplicate nicenames, they must be unique, so WordPress will automatically append -2, -3 etc. to the name upon creation if a duplicate would result.

  3. display_name is set to first name last name in title case with a space as a separator based upon the values stored in ActiveCampaign.

    If no first name and/or last name is defined within ActiveCampaign, ActiveMember360 does not set a display_name and WordPress sets the display_name as the user_login.

  4. nickname is set to first name in title case based upon the values stored in ActiveCampaign. If no first name exists ActiveMember360 does not set a nickname and WordPress sets the nickname to that of user_login.

As an example if the contact in ActiveCampaign has the following settings:

email = jpublic@yoursite.com
first name = Joe
last name = Public

The WordPress names would be assuming there are no other Joe Public in WordPress:

  1. user_login (username) = jpublic@yoursite.com
  2. user_nicename = joe-public
  3. display_name = Joe Public
  4. nickname = Joe

In all cases the user will be created with a WordPress role as specified in WordPress, Settings, General, New User Default Role.

If you wish to change the default behaviour ActiveMember360 provides various developer Filter Hooks to do so see API Filter Hooks

However user_login (username) can only ever be equivalent to the email address when the user is created by ActiveMember360.

Important

Once ActiveMember360 has created a WordPress user the user_nicename, display_name and nickname will never be changed by ActiveMember360 in any event, irrespective of whether the WordPress user's first_name and last_name is ever changed.

This is to ensure compatibility with other third party plugins that manipulate the user_nicename, display_name and nickname such as, but not limited, to bbPress and BuddyPress.

User created by ActiveMember360 during first login

It is not necessary for a visitor, who exists as a contact within ActiveCampaign, to exist within WordPress as a user before they can login to your WordPress sites powered by ActiveMember360 as a remote user.

ActiveMember360 will automatically create the WordPress user as required during the first successful login process by a contact using valid login credentials and who satisfy the login requirements, see WordPress Login.

When a visitor to your site clicks on a WordPress lost password link in order for the WordPress default password reset email to be sent the user must exist within WordPress.

ActiveMember360 will automatically create the WordPress user with a username and email address the same as that of the ActiveCampaign contact. The other WordPress user settings will be as detailed within Default WordPress User Settings when using ActiveMember360. The WordPress user will only be created if:

  1. The WordPress user does not already exist with the same email address as that submitted.

  2. An ActiveCampaign contact exists with the same email as that submitted and they satisfy the login requirements, see WordPress Login, for the WordPress site.

If these requirements are not satisfied a message will be shown that "There is no account with that username or email address." and no password reset email will be sent.

No WordPress new user login details email will be sent if the user is created by this process.

Important

The above also applies when using WooCommerce or other third party plugins that manage the Lost Password process.

User created by using the [mbr_password_send] shortcode

When a visitor submits an email address within the form generated by the [mbr_password_send] shortcode in order for the WordPress default password reset email to be sent the user must exist within WordPress.

ActiveMember360 will automatically create the WordPress user with a username and email address the same as that of the ActiveCampaign contact. The other WordPress user settings will be as detailed within Default WordPress User Settings when using ActiveMember360. The WordPress user will only be created if:

  1. The WordPress user does not already exist with the same email address as that submitted.

  2. The contact satisfies the login requirements, see WordPress Login, for the WordPress site.

If these requirements are not satisfied a message will be shown that "Invalid username or email." and no password reset email will be sent.

No WordPress new user login details email will be sent if the user is created by this process.

Full details of how to use the shortcode are available at Shortcodes, Action Shortcodes, [mbr_password_send].

User created by the ActiveMember360 User Create Webhook

ActiveMember360 provides a webhook, User Create, that can be triggered by a HTTP POST sent from an ActiveCampaign automation to create a WordPress user with a username and email address the same as that of the ActiveCampaign contact for whom the webhook is triggered. The other WordPress user settings will be as detailed within Default WordPress User Settings when using ActiveMember360.

The WordPress user will only be created for the ActiveCampaign contact if:

  1. The WordPress user does not already exist with the same email address as that of the contact for whom the webhook is triggered.

  2. The contact satisfies the login requirements, see WordPress Login, for the site URL used by the webhook.

A WordPress new user login details email will be sent if the user is created by this process.

Full details of how to implement this webhook are available at Webhooks, User Create.

User created by the ActiveMember360 Contact Password Reset Webhook

ActiveMember360 provides a webhook, Contact Password Reset, that can be triggered by a HTTP POST sent from an ActiveCampaign automation to send a WordPress reset password email to the contact for whom the webhook is triggered.

For this email to be valid and permit a password reset a WordPress user must exist.

Therefore if the webhook Contact Password Reset is used in an automation ActiveMember360 will automatically create a WordPress user with a username and email address the same as that of the ActiveCampaign contact. The other WordPress user settings will be as detailed within Default WordPress User Settings when using ActiveMember360.

The WordPress user will only be created for the ActiveCampaign contact if:

  1. The WordPress user does not already exist with the same email address as that of the contact for whom the webhook is triggered.

  2. The contact satisfies the login requirements, see WordPress Login, for the site URL used by the webhook.

No WordPress new user login details email will be sent if the user is created by this process.

Full details of how to implement this webhook are available at Webhooks, Contact Password Reset.

User created by the ActiveMember360 mbr_genpass Webhook

It is most likely that you do not want to add a WordPress user until that person subscribes to an email list, requests a lead magnet, or purchases a product or subscription from you.

ActiveMember360 provides a webhook, mbr_genpass, that can be triggered by a HTTP POST sent from an ActiveCampaign automation to both generate a password for the contact which is stored within ActiveCampaign, and create a WordPress user.

This webhook can be used multiple times to create WordPress users on any ActiveMember360 powered site once the contact exists within ActiveCampaign.

A password is only generated by the webhook and stored in ActiveCampaign if one does not exist, similarly a WordPress user is only created if one does not already exist.

No WordPress new user login details email will be sent if the user is created by this process.

Full details of how to implement this webhook are available at ActiveMember360, Webhooks, mbr_genpass.

User created by the ActiveMember360 Autologin Module

ActiveMember360 has an autologin capability that can be used to automatically login a validated visitor to your WordPress ActiveMember360 site. This is the ActiveMember360 Autologin Module.

A consequence of using the ActiveMember360 Autologin Module is that for any successful autologin attempt ActiveMember360 will automatically create a WordPress user if one does not already exist.

No WordPress new user login details email will be sent if the user is created by this process.

Full details regarding autologin capabilities and how to implement autologin are available at ActiveMember360, Modules, Autologin.

WooCommerce

A notable example of a third party WordPress plugin that can create WordPress users is WooCommerce.

When using WooCommerce users can be created in WordPress using the WooCommerce, Settings, Accounts & Privacy, Account Creation features.

Users created by WooCommerce will be given by default the custom WordPress user role of Customer.

Also, when using the ActiveMember360 WooCommerce Extension a contact will be automatically created within ActiveCampaign when the WordPress user is created by WooCommerce if one does not already exist.

If a contact already exists in ActiveCampaign when WooCommerce creates the WordPress user they will be given the password stored in ActiveCampaign rather than a new password being generated.

WooCommerce emails will be sent dependent upon the configuration within WooCommerce, Settings, Emails.

Import

There may be situations where you wish to create users in bulk for your WordPress site.

ActiveMember360 does not provide a facility to create users in bulk.

However, there are many third party plugins that can do this for you. Typically, these work with a CSV (Comma Separated Values) file.

An example of such a plugin is Import Export WordPress Users.