Skip to content

Instantly share code, notes, and snippets.

@RyanABailey
Created November 10, 2015 05:58
Show Gist options
  • Select an option

  • Save RyanABailey/86193312fc4387943092 to your computer and use it in GitHub Desktop.

Select an option

Save RyanABailey/86193312fc4387943092 to your computer and use it in GitHub Desktop.
Sitecore assigning custom profile
Sitecore.Security.Accounts.User user = Sitecore.Security.Accounts.User.FromName("extranet\Ryan", true);
Sitecore.Security.UserProfile userProfile = user.Profile;
userProfile.SetPropertyValue("ProfileItemId", "{53DAD220-96B3-424C-9ABA-1D14740D7EF6}");
userProfile.Save();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment