Is there a way to override HttpContext.Current.User.Identity to add another property (screen name)?
My application uses Identity and I\'ve
I found one implementation:
var profile = db.UserProfile.Where(u => u.UserId == user.Id).FirstOrDefault();
ProfileBase httpProfile = ProfileBase.Create(user.UserName);
httpProfile.SetPropertyValue("FullName", profile.FullName);
httpProfile.SetPropertyValue("FirstName", profile.FirstName);
httpProfile.SetPropertyValue("LastName", profile.LastName);
Then to get later...
ProfileBase userProfile = ProfileBase.Create(HttpContext.User.Identity.Name);
var fullName = userProfile.GetPropertyValue("FullName"));