I need to fetch the Sitecore user information, mainly user's first name, last name along with user name. Username can be fetched from the table Users in Core db.
Which table contains the user's first and last name details in Core db?
Thanks -Sunil
I need to fetch the Sitecore user information, mainly user's first name, last name along with user name. Username can be fetched from the table Users in Core db.
Which table contains the user's first and last name details in Core db?
Thanks -Sunil
The location of the data is outlined in the answer to this Stack Overflow question:
Sitecore Custom User Profile - where is it stored how can it be queried
As they point out, the data isn't the easily accessible and it might be a good idea to use the Sitecore API to obtain it instead.
This document talks about getting/setting standard profile properties via the API:
... and this article talks about getting/setting custom properties:
Sitecore doesn't provide any fields for firstname and lastname, so you can only fetch Fullname and Username. IF you want to enter these information as well then you need to create your custom fields as Martin suggested in post.
To get Fullname and Username you can use below code -
Sitecore.Context.User.Profile.FullName
Sitecore.Context.User.Profile.UserName