Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes LastLockOut DateTime value #16833

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/Umbraco.Infrastructure/Security/IdentityMapDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Loading