At this point you can start to write the custom Membership Provider class.
For more information, see Custom membership provider: Full code.
Start with the methods you need to validate a user on the frontend. You must override the following methods:
The above methods use the following private methods, which you added to the class:
You can use different encodings regarding the passwords. This example uses the Encrypted format, which allows you to read back the password, so that the user can do a password retrieval, if needed.
The available formats are the following:
NOTE: The GetUsers() method returns an IQueryable result set of all users. When querying the result using LINQ, it takes place in the memory, causing a performance hit.
In the default Sitefinity CMS provider this does not happen, as Sitefinity CMS uses its own queryable LINQ implementation with OpenAccess, which returns the user records already filtered.
You also implement the methods to create and delete users from the backend. Since you are using encrypted passwords, it is not that easy to just enter some vanilla data inside the table. You must enable the logic to do this from the backend, using the following:
Back To Top