Browse Source
Merge pull request #898 from abpframework/AbpAccountWebModule-CheckPassword-Null-User-Control
Checked if identityUser is null in CheckPassword method of AbpAccount…
pull/900/head
Halil İbrahim Kalkan
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
6 additions and
0 deletions
-
modules/account/src/Volo.Abp.Account.Web/Areas/Account/Controllers/AccountController.cs
|
|
|
@ -47,6 +47,12 @@ namespace Volo.Abp.Account.Web.Areas.Account.Controllers |
|
|
|
{ |
|
|
|
ValidateLoginInfo(login); |
|
|
|
var identityUser = await _userManager.FindByNameAsync(login.UserNameOrEmailAddress); |
|
|
|
|
|
|
|
if (identityUser == null) |
|
|
|
{ |
|
|
|
return new AbpLoginResult(LoginResultType.InvalidUserNameOrPassword); |
|
|
|
} |
|
|
|
|
|
|
|
return GetAbpLoginResult(await _signInManager.CheckPasswordSignInAsync(identityUser, login.Password, true)); |
|
|
|
} |
|
|
|
|
|
|
|
|