diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserManager.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserManager.cs index fc71966c09..5ce3663e14 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserManager.cs +++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserManager.cs @@ -321,7 +321,7 @@ public class IdentityUserManager : UserManager, IDomainService result.CheckErrors(); - if (!string.IsNullOrEmpty(oldUserName) && !oldUserName.Equals(userName, StringComparison.OrdinalIgnoreCase)) + if (!string.IsNullOrEmpty(oldUserName) && oldUserName != userName) { await DistributedEventBus.PublishAsync( new IdentityUserUserNameChangedEto