diff --git a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs index 002261df46..a623894625 100644 --- a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs +++ b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs @@ -456,6 +456,11 @@ public class EfCoreIdentityUserRepository : EfCoreRepository x.Id == id); + } if (roleId.HasValue) { @@ -464,11 +469,6 @@ public class EfCoreIdentityUserRepository : EfCoreRepository identityUser.Roles.Any(x => x.RoleId == roleId.Value) || identityUser.OrganizationUnits.Any(x => organizationUnitIds.Contains(x.OrganizationUnitId))); } - if (id.HasValue) - { - return query.Where(x => x.Id == id); - } - return query .WhereIf( !filter.IsNullOrWhiteSpace(),