updates more user properties

This commit is contained in:
Shannon
2017-05-22 21:23:04 +10:00
parent 48432179be
commit 517dc3abe3
2 changed files with 25 additions and 5 deletions

View File

@@ -31,14 +31,19 @@ namespace Umbraco.Web.Models.Mapping
.ForMember(
detail => detail.AvailableCultures,
opt => opt.MapFrom(user => applicationContext.Services.TextService.GetSupportedCultures().ToDictionary(x => x.Name, x => x.DisplayName)))
.ForMember(
detail => detail.EmailHash,
opt => opt.MapFrom(user => user.Email.ToLowerInvariant().Trim().ToMd5()))
.ForMember(detail => detail.ParentId, opt => opt.UseValue(-1))
.ForMember(detail => detail.Path, opt => opt.MapFrom(user => "-1," + user.Id))
.ForMember(detail => detail.Path, opt => opt.MapFrom(user => "-1," + user.Id))
.ForMember(detail => detail.Notifications, opt => opt.Ignore())
.ForMember(detail => detail.Udi, opt => opt.Ignore())
.ForMember(detail => detail.Icon, opt => opt.Ignore())
.ForMember(detail => detail.Trashed, opt => opt.Ignore())
.ForMember(detail => detail.Alias, opt => opt.Ignore())
.ForMember(detail => detail.Trashed, opt => opt.Ignore())
//TODO: Enable this when we can!
.ForMember(detail => detail.CustomAvatar, opt => opt.Ignore())
.ForMember(detail => detail.AdditionalData, opt => opt.Ignore());
config.CreateMap<IUser, UserDetail>()