1

Can someone please help me understand the use and difference between aspnet_Users, aspnet_Profile and aspnet_Membership tables in Sitecore?

And what sequence Sitecore follows to create user I mean does it 1st create user in aspnet_Users then Profile in aspnet_Profile and then uses aspnet_Membership?

1 Answer 1

2

To understand this subject better, it's best if you learn how ASP.Net Membership works first using Microsoft documentation:

https://learn.microsoft.com/en-us/previous-versions/aspnet/tw292whz(v=vs.100)

The 3 tables you ask for, when you work with Sitecore:

  1. aspnet_Users - it only stores users. The following columns:
  • UserId (to match with other tables),
  • UserName and -LastActivityDatecolumns are the only ones that most probably will be ever important to you.
  1. aspnet_Profile table contains additional values for users. It has following columns:
  • UserId to match users from aspnet_Users table
  • PropertyNames containing names of the properties and their positions and size in other columns
  • PropertyValuesString - containing values of string properties
  • PropertyValuesBinary - containing values of properties which are not stored as strings.
  1. aspnet_Membership table contains plenty of columns but you should be only interested in those:
  • UserId - to match users from aspnet_Users table
  • Password - encoded password
  • Email
  • IsApproved
  • IsLockedOut

Knowing that, when you create a new user, Sitecore creates entries in all 3 tables in one SQL transaction (or at least one right after another). It creates row for user details in aspnet_Users, stores password and email in aspnet_Membership table and saves some properties like first name and last name in aspnet_Profile table.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.