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 6 years ago committed by GitHub
commit eacdbc2f60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -47,6 +47,12 @@ namespace Volo.Abp.Account.Web.Areas.Account.Controllers
{ {
ValidateLoginInfo(login); ValidateLoginInfo(login);
var identityUser = await _userManager.FindByNameAsync(login.UserNameOrEmailAddress); var identityUser = await _userManager.FindByNameAsync(login.UserNameOrEmailAddress);
if (identityUser == null)
{
return new AbpLoginResult(LoginResultType.InvalidUserNameOrPassword);
}
return GetAbpLoginResult(await _signInManager.CheckPasswordSignInAsync(identityUser, login.Password, true)); return GetAbpLoginResult(await _signInManager.CheckPasswordSignInAsync(identityUser, login.Password, true));
} }

Loading…
Cancel
Save