mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-29 03:44:27 +01:00
Merge pull request #1994 from btcpayserver/forgotpassword
fix forgot password
This commit is contained in:
@@ -537,7 +537,7 @@ namespace BTCPayServer.Controllers
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
var user = await _userManager.FindByEmailAsync(model.Email);
|
||||
if (user == null || !(await _userManager.IsEmailConfirmedAsync(user)))
|
||||
if (user == null || (user.RequiresEmailConfirmation && !(await _userManager.IsEmailConfirmedAsync(user))))
|
||||
{
|
||||
// Don't reveal that the user does not exist or is not confirmed
|
||||
return RedirectToAction(nameof(ForgotPasswordConfirmation));
|
||||
|
||||
Reference in New Issue
Block a user