Skip to content

Commit

Permalink
Merge pull request #10111 from abpframework/maliming-patch-concurrency
Browse files Browse the repository at this point in the history
Call `SetConcurrencyStampIfNotNull` before save changes.
  • Loading branch information
realLiangshiwei authored Sep 23, 2021
2 parents c13fb4b + 6e106d5 commit 88d0a65
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ public virtual async Task<ProfileDto> UpdateAsync(UpdateProfileDto input)

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))
Expand All @@ -63,8 +65,6 @@ public virtual async Task<ProfileDto> UpdateAsync(UpdateProfileDto input)
user.Name = input.Name;
user.Surname = input.Surname;

user.SetConcurrencyStampIfNotNull(input.ConcurrencyStamp);

input.MapExtraPropertiesTo(user);

(await UserManager.UpdateAsync(user)).CheckErrors();
Expand Down

0 comments on commit 88d0a65

Please sign in to comment.