0

I am saving a user profile and one of the field is "UserLanguage" which is saving fine

Context.User.Profile.Save();

The save method is working as expected but where the User Profile being saved in the database as I want to see UserLanguage field for each Profile.

1 Answer 1

0

Sitecore uses aspnet membership provider and stores the user profile information in the aspnet_Profile table. All the properties are serialized into the PropertyNames / PropertyValuesString columns.

https://msdn.microsoft.com/en-au/library/aa478953.aspx

Run below query onto Sitecore Core database on aspnet_profile table.

SELECT TOP 1000 [UserId]
  ,[PropertyNames]
  ,[PropertyValuesString]
  ,[PropertyValuesBinary]
  ,[LastUpdatedDate]
FROM [Website826_Core].[dbo].[aspnet_Profile]

You will be able to set the new properties from web.config file using below tags. Have a look at your application's web config and check profile tag for exact details.

<profile defaultProvider="sql" enabled="true" inherits="Sitecore.Security.UserProfile, Sitecore.Kernel">
  <providers>
    <clear />
    <add name="sql" type="System.Web.Profile.SqlProfileProvider" connectionStringName="core" applicationName="sitecore" />
    <add name="switcher" type="Sitecore.Security.SwitchingProfileProvider, Sitecore.Kernel" applicationName="sitecore" mappings="switchingProviders/profile" />
  </providers>
  <properties>
    <clear />
    <add type="System.String" name="SC_UserData" />
  </properties>
</profile>

Your Answer

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