From 41f2b4013f75ff58f47cfdf47ea488057c6196b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=86=9B?= <510423039@qq.com> Date: Sat, 30 Apr 2022 15:39:00 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=91=20=20=E7=94=A8=E6=88=B7=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E5=88=A4=E6=96=AD=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/Lion.AbpPro.Application/Users/AccountAppService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aspnet-core/services/src/Lion.AbpPro.Application/Users/AccountAppService.cs b/aspnet-core/services/src/Lion.AbpPro.Application/Users/AccountAppService.cs index abf57bb5..464f5dda 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Application/Users/AccountAppService.cs +++ b/aspnet-core/services/src/Lion.AbpPro.Application/Users/AccountAppService.cs @@ -139,7 +139,7 @@ namespace Lion.AbpPro.Users private async Task 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,