Custom membership provider: Example of using the custom membership provider

Login to the backend of Sitefinity CMS using the Default authentication provider. Open the Users page by clicking Administration » Users. Above the toolbar of the page, you can see all available providers, including the one you created - Customer Support.

When you click Customer Support, an empty list is shown, since you have not yet created any users.

You already implemented the logic in the provider to create and delete users from Sitefinity CMS backend, so when you click Create a user button, you create an actual customer record inside our database.

When you fill out the fields, Sitefinity CMS creates the link between the Sitefinity CMS user and the profile information. Inside this profile information, Sitefinity CMS stores data such as Firstname and Lastname.

You can then choose which provider you want to use for the user and you can decide whether you want to make this user a backend user or if the user is a public user.

As an example, use the following values for this new user:

Username Sfcustomer
Password Membership2013
Confirm password Membership2013
Firstname Custom
Lastname Member
Is a public profile True
This user can access site backend True
Provider CustomMembershipProvider
Roles Authors

When you are done, click Create this user and you return to the users grid, which now shows the new user.

Because you have enabled Access site backend, you can test this by performing the following:

  1. Log out of Sitefinity.
  2. Navigate to the login page again.
  3. In Authentication Provider, choose CustomMembershipProvider.
  4. To login, use the credentials for the new user.

You have successfully logged in to Sitefinity CMS using the custom membership provider.

Want to learn more?

Sign up for our free beginner training. Boost your credentials through advanced courses and certification.
Register for Sitefinity training and certification.

Was this article helpful?