Custom membership provider: Example of using the custom membership provider

Login to the backend of Sitefinity CMS using the Defaultauthentication provider. Open the Userspage 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 Firstnameand 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

Email

user@customers.com

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?
Enhance your Sitefinity skills by enrolling in free training sessions. Become Sitefinity certified through Progress Education Community to strengthen your professional credentials.
New to Sitefinity?