Browse Source

Call `SetConcurrencyStampIfNotNull` before save changes.

pull/10111/head
maliming 5 years ago
committed by GitHub
parent
commit
6e106d53c1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/ProfileAppService.cs

4
modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/ProfileAppService.cs

@ -39,6 +39,8 @@ namespace Volo.Abp.Identity
var user = await UserManager.GetByIdAsync(CurrentUser.GetId());
user.SetConcurrencyStampIfNotNull(input.ConcurrencyStamp);
if (!string.Equals(user.UserName, input.UserName, StringComparison.InvariantCultureIgnoreCase))
{
if (await SettingProvider.IsTrueAsync(IdentitySettingNames.User.IsUserNameUpdateEnabled))
@ -63,8 +65,6 @@ namespace Volo.Abp.Identity
user.Name = input.Name;
user.Surname = input.Surname;
user.SetConcurrencyStampIfNotNull(input.ConcurrencyStamp);
input.MapExtraPropertiesTo(user);
(await UserManager.UpdateAsync(user)).CheckErrors();

Loading…
Cancel
Save