diff --git a/src/Umbraco.Infrastructure/Security/IdentityMapDefinition.cs b/src/Umbraco.Infrastructure/Security/IdentityMapDefinition.cs index 9e9a85811b80..fb1ee01666c2 100644 --- a/src/Umbraco.Infrastructure/Security/IdentityMapDefinition.cs +++ b/src/Umbraco.Infrastructure/Security/IdentityMapDefinition.cs @@ -135,6 +135,12 @@ private void Map(IUser source, BackOfficeIdentityUser target) // Umbraco.Code.MapAll -Id -LockoutEnabled -PhoneNumber -PhoneNumberConfirmed -ConcurrencyStamp -NormalizedEmail -NormalizedUserName -Roles private void Map(IMember source, MemberIdentityUser target) { + // LastLockoutDate is a DateTime object with UTC kind but the fact is it's not + if (source.LastLockoutDate.HasValue) + { + source.LastLockoutDate = new DateTime(source.LastLockoutDate.Value.Ticks, DateTimeKind.Local); + } + target.Email = source.Email; target.UserName = source.Username; target.LastPasswordChangeDateUtc = source.LastPasswordChangeDate?.ToUniversalTime();