0
TimMackey created
ANZ ver 8.1.0 angular/.net core
When I use the "Forgot Password" interface, this code in AccountAppService.cs keeps throwing an "InvalidEmailAddress" exception for email addresses of existing users.
private async Task<User> GetUserByChecking(string inputEmailAddress)
{
var user = await UserManager.FindByEmailAsync(inputEmailAddress);
if (user == null)
{
throw new UserFriendlyException(L("InvalidEmailAddress"));
}
return user;
}
1 Answer(s)
-
0
This issue has been resolved by using the injected UserManager. i.e.
var user = await _userManager.FindByEmailAsync(inputEmailAddress);