In this tutorial I will explain how to use the Facebook Connect Plugin in conjunction with WP eMember to add facebook registration and login to your membership site.
The process is simple but first I would like to explain why the extra steps are needed.
eMember Does Not Create WordPress User Accounts by Default
When someone logs into a WordPress site using Facebook Connect they must have an existing WordPress user account. By default, when a new user is created in eMember, the user is not also created in WordPress. The account profiles for eMember are kept separate.
It makes no sense (in most cases) for someone to login to WordPress on a membership site without getting access to the content they are meant to have access to.
Therefore mirrored accounts need to be created, and mirrored logins need to happen to keep things simple for the users.
Optionally Import WordPress User Accounts Into eMember
If you have WordPress user accounts that need to be brought into eMember, you can do that very quickly. You have the option to import all accounts or just a selection of them.
Here are the steps:
- Go to WP eMember >> Members >> Import WP Users
- Choose which accounts you want to copy over, the membership level to use, etc.
- Click the Submit button.
Use Automation For Future Account Creation And Logins
Now that you have matching accounts between eMember and WordPress for all of the accounts that you want to, you can now set it up so that this happens automatically from here on out. At the same time we can turn on the auto background login features.
If you intend to turn on the ability to allow users to register to WordPress with Facebook Connect, we will need to make sure that a corresponding eMember account is created as well.
To enable that feature:
- Go to WP eMember >> Admin Functions.
- Look for the section labeled Automatically Create eMember Account When a WordPress User Account is Created.
- Enable it and click the Save Settings button.
Now, let’s set it up so that when an eMember account is created, a WordPress account is created in the background at the same time. While we are at it, we’ll turn on the auto login features at the same time.
Follow the steps below:
- Go to WP eMember >> Settings.
- Scroll down and look for the section labeled WordPress User Integration Settings.
- Turn on the top 3 options labeled “Automatically Create WordPress User,” “Automatically log into WordPress,” and “Automatically log into eMember.”
- Scroll to the bottom and click the Update Options button.
When everything is complete, test logins and registration using all scenarios to be certain all works as expected.