How to Store Custom User Profile Properties in Sitecore

Sitecore works best for storing users and custom user profile properties for a user. It works based on .Net Security Mechanism. Custom profile properties are very much useful when you need to store information of a user which you need to be available throughout the system. It can be accessed anytime. No need for doing database transactions for the values which are stored as a custom property for a user. It can be used to store values for a user like Full Name, Birthdate, Gender, etc.

I have built a demo application for you to understand in an
easy and simple way of implementing Sitecore User Profile Custom Properties.
Here we are storing Full Name in custom properties with the Property Name “Full Name”.

Let us first do Sitecore Configurations.

1) We’ll first start with the properties that we want to store.

Go to Core database. We have to define a new template item and add all the property names that you want to store. We are storing Full Name.
Sitecore Path: /sitecore/templates/Users/Custom Profile
Here we have created a new folder Users and added a new template Custom Profile derived from Template. You can create a new template anywhere under the templates section.

Note: Consumer – is the newly created Domain and Template ID: “{6D01FC92-6B3A-4D17-84A9-FE1BD20E0D3E}” is the ID of the new User Profile that we created! We have to pass the domain
and update the Profile ID of the user Otherwise we won’t be able to see the Custom Property Values in Sitecore. It is must to Save the Profile else value won’t be saved. Now this will create a new user and will have “Nikki Punjabi” as a value of Custom Property – “Full Name”.