From dfcc1f042532bb950bdd305ca0203392ed32a7d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=86=9B?= <510423039@qq.com> Date: Thu, 9 Mar 2023 16:13:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=AF=86=E7=A0=81=E6=A3=80=E6=9F=A5=E9=94=99=E8=AF=AF=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Users/UserAppService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Users/UserAppService.cs b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Users/UserAppService.cs index 2d676b26..7650f165 100644 --- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Users/UserAppService.cs +++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Users/UserAppService.cs @@ -132,15 +132,15 @@ namespace Lion.AbpPro.BasicManagement.Users if (identityUser.PasswordHash == null) { result = await _userManager.AddPasswordAsync(identityUser, input.NewPassword); + result.CheckErrors(); } else { result = await _userManager.ChangePasswordAsync(identityUser, input.CurrentPassword, input.NewPassword); + result.CheckErrors(); } - return !result.Succeeded - ? throw new BusinessException("Volo.Abp.Identity:" + result?.Errors?.FirstOrDefault()?.Code) - : result.Succeeded; + return result.Succeeded; } ///