Browse Source

🚑 用户状态判断错误

pull/43/head
王军 4 years ago
parent
commit
41f2b4013f
  1. 2
      aspnet-core/services/src/Lion.AbpPro.Application/Users/AccountAppService.cs

2
aspnet-core/services/src/Lion.AbpPro.Application/Users/AccountAppService.cs

@ -139,7 +139,7 @@ namespace Lion.AbpPro.Users
private async Task<LoginOutput> BuildResult(IdentityUser user)
{
if (user.LockoutEnabled) throw new UserFriendlyException("当前用户已被锁定");
if (!user.IsActive) throw new UserFriendlyException("当前用户已被锁定");
var roles = await _userManager.GetRolesAsync(user);
if (roles == null || roles.Count == 0) throw new UserFriendlyException("当前用户未分配角色");
var token = GenerateJwt(user.Id, user.UserName, user.Name, user.Email,

Loading…
Cancel
Save