Merge remote-tracking branch 'origin/dev-v7' into user-group-permissions
# Conflicts: # build/UmbracoVersion.txt # src/SolutionInfo.cs # src/Umbraco.Web.UI/Umbraco.Web.UI.csproj # src/Umbraco.Web/Editors/GravatarController.cs # src/Umbraco.Web/Models/Mapping/UserModelMapper.cs
This commit is contained in:
@@ -16,7 +16,7 @@ using Umbraco.Core.Services;
|
||||
using UserProfile = Umbraco.Web.Models.ContentEditing.UserProfile;
|
||||
|
||||
namespace Umbraco.Web.Models.Mapping
|
||||
{
|
||||
{
|
||||
|
||||
internal class UserModelMapper : MapperConfiguration
|
||||
{
|
||||
@@ -38,8 +38,8 @@ namespace Umbraco.Web.Models.Mapping
|
||||
|
||||
config.CreateMap<UserInvite, IUser>()
|
||||
.ConstructUsing(invite => new User(invite.Name, invite.Email, invite.Email, Guid.NewGuid().ToString("N")))
|
||||
.IgnoreAllUnmapped()
|
||||
//generate a new token
|
||||
.IgnoreAllUnmapped()
|
||||
//generate a new token
|
||||
.ForMember(user => user.SecurityStamp, expression => expression.MapFrom(x => (DateTime.Now + x.Email).ToSHA1()))
|
||||
//all invited users will not be approved, completing the invite will approve the user
|
||||
.ForMember(user => user.IsApproved, expression => expression.UseValue(false))
|
||||
@@ -115,7 +115,7 @@ namespace Umbraco.Web.Models.Mapping
|
||||
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()))
|
||||
opt => opt.MapFrom(user => user.Email.ToLowerInvariant().Trim().GenerateHash()))
|
||||
.ForMember(detail => detail.ParentId, opt => opt.UseValue(-1))
|
||||
.ForMember(detail => detail.Path, opt => opt.MapFrom(user => "-1," + user.Id))
|
||||
.ForMember(detail => detail.Notifications, opt => opt.Ignore())
|
||||
@@ -169,7 +169,7 @@ namespace Umbraco.Web.Models.Mapping
|
||||
.ForMember(detail => detail.Culture, opt => opt.MapFrom(user => user.GetUserCulture(applicationContext.Services.TextService)))
|
||||
.ForMember(
|
||||
detail => detail.EmailHash,
|
||||
opt => opt.MapFrom(user => user.Email.ToLowerInvariant().Trim().ToMd5()))
|
||||
opt => opt.MapFrom(user => user.Email.ToLowerInvariant().Trim().GenerateHash()))
|
||||
.ForMember(detail => detail.SecondsUntilTimeout, opt => opt.Ignore());
|
||||
|
||||
config.CreateMap<IProfile, UserProfile>()
|
||||
@@ -207,7 +207,7 @@ namespace Umbraco.Web.Models.Mapping
|
||||
{
|
||||
display.Icon = "icon-users";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static int GetIntId(object id)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user