diff --git a/src/Umbraco.Core/Migrations/Install/DatabaseDataCreator.cs b/src/Umbraco.Core/Migrations/Install/DatabaseDataCreator.cs index ce795cec64..c4ebfb664b 100644 --- a/src/Umbraco.Core/Migrations/Install/DatabaseDataCreator.cs +++ b/src/Umbraco.Core/Migrations/Install/DatabaseDataCreator.cs @@ -243,7 +243,7 @@ namespace Umbraco.Core.Migrations.Install private void CreateDataTypeData() { - void InsertDataTypeDto(int id, string dbType, string editorAlias, string configuration = null) + void InsertDataTypeDto(int id, string editorAlias, string dbType, string configuration = null) { var dataTypeDto = new DataTypeDto { diff --git a/src/Umbraco.Web.UI.Client/src/views/member/member.edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/member/member.edit.controller.js index 78daeceab4..a3c74c56d1 100644 --- a/src/Umbraco.Web.UI.Client/src/views/member/member.edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/member/member.edit.controller.js @@ -77,10 +77,10 @@ function MemberEditController($scope, $routeParams, $location, $q, $window, appS } else { //so, we usually refernce all editors with the Int ID, but with members we have - //a different pattern, adding a route-redirect here to handle this: - //isNumber doesnt work here since its seen as a string - - //TODO: Why is this here - I don't understand why this would ever be an integer? This will not work when we support non-umbraco membership providers. + //a different pattern, adding a route-redirect here to handle this just in case. + //(isNumber doesnt work here since its seen as a string) + //The reason this might be an INT is due to the routing used for the member list view + //but this is now configured to use the key, so this is just a fail safe if ($routeParams.id && $routeParams.id.length < 9) { diff --git a/src/Umbraco.Web/Models/Mapping/MemberMapperProfile.cs b/src/Umbraco.Web/Models/Mapping/MemberMapperProfile.cs index 68a3c4de75..3fb603cb32 100644 --- a/src/Umbraco.Web/Models/Mapping/MemberMapperProfile.cs +++ b/src/Umbraco.Web/Models/Mapping/MemberMapperProfile.cs @@ -34,7 +34,7 @@ namespace Umbraco.Web.Models.Mapping //FROM MembershipUser TO IMember - used when using a non-umbraco membership provider CreateMap() .ConstructUsing(src => MemberService.CreateGenericMembershipProviderMember(src.UserName, src.Email, src.UserName, "")) - //we're giving this entity an ID of 0 - we cannot really map it but it needs an id so the system knows it's not a new entity + //we're giving this entity an ID of int.MaxValue - TODO: SD: I can't remember why this mapping is here? .ForMember(dest => dest.Id, opt => opt.MapFrom(src => int.MaxValue)) .ForMember(dest => dest.Comments, opt => opt.MapFrom(src => src.Comment)) .ForMember(dest => dest.CreateDate, opt => opt.MapFrom(src => src.CreationDate)) @@ -84,6 +84,8 @@ namespace Umbraco.Web.Models.Mapping //FROM IMember TO MemberBasic CreateMap() + //we're giving this entity an ID of int.MaxValue - this is kind of a hack to force angular to use the Key instead of the Id in list views + .ForMember(dest => dest.Id, opt => opt.MapFrom(src => int.MaxValue)) .ForMember(dest => dest.Udi, opt => opt.MapFrom(content => Udi.Create(Constants.UdiEntityType.Member, content.Key))) .ForMember(dest => dest.Owner, opt => opt.ResolveUsing(src => memberOwnerResolver.Resolve(src))) .ForMember(dest => dest.Icon, opt => opt.MapFrom(src => src.ContentType.Icon)) @@ -99,7 +101,7 @@ namespace Umbraco.Web.Models.Mapping //FROM MembershipUser TO MemberBasic CreateMap() - //we're giving this entity an ID of 0 - we cannot really map it but it needs an id so the system knows it's not a new entity + //we're giving this entity an ID of int.MaxValue - TODO: SD: I can't remember why this mapping is here? .ForMember(dest => dest.Id, opt => opt.MapFrom(src => int.MaxValue)) .ForMember(dest => dest.Udi, opt => opt.Ignore()) .ForMember(dest => dest.CreateDate, opt => opt.MapFrom(src => src.CreationDate))