Browse Source

Rename `IsActive` to `NotActive`.

pull/10501/head
maliming 5 years ago
parent
commit
54d0864f2e
No known key found for this signature in database GPG Key ID: 96224957E51C89E
  1. 4
      modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IIdentityUserRepository.cs
  2. 8
      modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs
  3. 8
      modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityUserRepository.cs

4
modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IIdentityUserRepository.cs

@ -62,7 +62,7 @@ namespace Volo.Abp.Identity
string phoneNumber = null,
string emailAddress = null,
bool? isLockedOut = null,
bool? isActive = null,
bool? notActive = null,
CancellationToken cancellationToken = default
);
@ -99,7 +99,7 @@ namespace Volo.Abp.Identity
string phoneNumber = null,
string emailAddress = null,
bool? isLockedOut = null,
bool? isActive = null,
bool? notActive = null,
CancellationToken cancellationToken = default
);
}

8
modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs

@ -142,7 +142,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore
string phoneNumber = null,
string emailAddress = null,
bool? isLockedOut = null,
bool? isActive = null,
bool? notActive = null,
CancellationToken cancellationToken = default)
{
return await (await GetDbSetAsync())
@ -162,7 +162,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore
.WhereIf(!string.IsNullOrWhiteSpace(phoneNumber), x => x.PhoneNumber == phoneNumber)
.WhereIf(!string.IsNullOrWhiteSpace(emailAddress), x => x.Email == emailAddress)
.WhereIf(isLockedOut == true, x => x.LockoutEnabled && x.LockoutEnd > DateTimeOffset.UtcNow)
.WhereIf(isActive == true, x => x.IsActive == isActive)
.WhereIf(notActive == true, x => !x.IsActive)
.OrderBy(sorting.IsNullOrWhiteSpace() ? nameof(IdentityUser.UserName) : sorting)
.PageBy(skipCount, maxResultCount)
.ToListAsync(GetCancellationToken(cancellationToken));
@ -207,7 +207,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore
string phoneNumber = null,
string emailAddress = null,
bool? isLockedOut = null,
bool? isActive = null,
bool? notActive = null,
CancellationToken cancellationToken = default)
{
return await (await GetDbSetAsync())
@ -226,7 +226,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore
.WhereIf(!string.IsNullOrWhiteSpace(phoneNumber), x => x.PhoneNumber == phoneNumber)
.WhereIf(!string.IsNullOrWhiteSpace(emailAddress), x => x.Email == emailAddress)
.WhereIf(isLockedOut == true, x => x.LockoutEnabled && x.LockoutEnd > DateTimeOffset.UtcNow)
.WhereIf(isActive == true, x => x.IsActive == isActive)
.WhereIf(notActive == true, x => !x.IsActive)
.LongCountAsync(GetCancellationToken(cancellationToken));
}

8
modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityUserRepository.cs

@ -144,7 +144,7 @@ namespace Volo.Abp.Identity.MongoDB
string phoneNumber = null,
string emailAddress = null,
bool? isLockedOut = null,
bool? isActive = null,
bool? notActive = null,
CancellationToken cancellationToken = default)
{
return await (await GetMongoQueryableAsync(cancellationToken))
@ -163,7 +163,7 @@ namespace Volo.Abp.Identity.MongoDB
.WhereIf<IdentityUser, IMongoQueryable<IdentityUser>>(!string.IsNullOrWhiteSpace(phoneNumber), x => x.PhoneNumber == phoneNumber)
.WhereIf<IdentityUser, IMongoQueryable<IdentityUser>>(!string.IsNullOrWhiteSpace(emailAddress), x => x.Email == emailAddress)
.WhereIf<IdentityUser, IMongoQueryable<IdentityUser>>(isLockedOut == true, x => x.LockoutEnabled && x.LockoutEnd > DateTimeOffset.UtcNow)
.WhereIf<IdentityUser, IMongoQueryable<IdentityUser>>(isActive == true, x => x.IsActive == isActive)
.WhereIf<IdentityUser, IMongoQueryable<IdentityUser>>(notActive == true, x => !x.IsActive)
.OrderBy(sorting.IsNullOrWhiteSpace() ? nameof(IdentityUser.UserName) : sorting)
.As<IMongoQueryable<IdentityUser>>()
.PageBy<IdentityUser, IMongoQueryable<IdentityUser>>(skipCount, maxResultCount)
@ -215,7 +215,7 @@ namespace Volo.Abp.Identity.MongoDB
string phoneNumber = null,
string emailAddress = null,
bool? isLockedOut = null,
bool? isActive = null,
bool? notActive = null,
CancellationToken cancellationToken = default)
{
return await (await GetMongoQueryableAsync(cancellationToken))
@ -234,7 +234,7 @@ namespace Volo.Abp.Identity.MongoDB
.WhereIf<IdentityUser, IMongoQueryable<IdentityUser>>(!string.IsNullOrWhiteSpace(phoneNumber), x => x.PhoneNumber == phoneNumber)
.WhereIf<IdentityUser, IMongoQueryable<IdentityUser>>(!string.IsNullOrWhiteSpace(emailAddress), x => x.Email == emailAddress)
.WhereIf<IdentityUser, IMongoQueryable<IdentityUser>>(isLockedOut == true, x => x.LockoutEnabled && x.LockoutEnd > DateTimeOffset.UtcNow)
.WhereIf<IdentityUser, IMongoQueryable<IdentityUser>>(isActive == true, x => x.IsActive == isActive)
.WhereIf<IdentityUser, IMongoQueryable<IdentityUser>>(notActive == true, x => !x.IsActive)
.LongCountAsync(GetCancellationToken(cancellationToken));
}

Loading…
Cancel
Save