From a8c5186bde1ca44f00638491b3f2639e17c05b34 Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 5 Jan 2021 10:15:32 +0800 Subject: [PATCH 1/2] Update the entity after changing its properties. Resolve #7000 --- .../Volo/Abp/Identity/IdentityUserAppService.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs index 31c9de0e18..9d3b7f5c12 100644 --- a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs +++ b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs @@ -84,7 +84,9 @@ namespace Volo.Abp.Identity input.MapExtraPropertiesTo(user); (await UserManager.CreateAsync(user, input.Password)).CheckErrors(); + await UpdateUserByInput(user, input); + (await UserManager.UpdateAsync(user)).CheckErrors(); await CurrentUnitOfWork.SaveChangesAsync(); @@ -174,6 +176,7 @@ namespace Volo.Abp.Identity user.Name = input.Name; user.Surname = input.Surname; + (await UserManager.UpdateAsync(user)).CheckErrors(); if (input.RoleNames != null) { From cb3ea0e5acdfaf1f4689660430ad310b821b828f Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 5 Jan 2021 10:20:15 +0800 Subject: [PATCH 2/2] Remove blank line. --- .../Volo/Abp/Identity/IdentityUserAppService.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs index 9d3b7f5c12..69fae63d71 100644 --- a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs +++ b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs @@ -84,7 +84,6 @@ namespace Volo.Abp.Identity input.MapExtraPropertiesTo(user); (await UserManager.CreateAsync(user, input.Password)).CheckErrors(); - await UpdateUserByInput(user, input); (await UserManager.UpdateAsync(user)).CheckErrors();