Revert "search all user by email at forgotten password"
This reverts commit 406e2ff03a.
This commit is contained in:
parent
406e2ff03a
commit
a0342ea988
1 changed files with 13 additions and 13 deletions
|
|
@ -42,11 +42,11 @@ namespace Yavsc.Controllers
|
||||||
readonly TwilioSettings _twilioSettings;
|
readonly TwilioSettings _twilioSettings;
|
||||||
|
|
||||||
readonly IStringLocalizer _localizer;
|
readonly IStringLocalizer _localizer;
|
||||||
private readonly IStringLocalizer _sharedLocalizer;
|
private readonly IStringLocalizer _sharedLocalizer;
|
||||||
|
|
||||||
// TwilioSettings _twilioSettings;
|
// TwilioSettings _twilioSettings;
|
||||||
|
|
||||||
readonly ApplicationDbContext _dbContext;
|
readonly ApplicationDbContext _dbContext;
|
||||||
private readonly IIdentityServerInteractionService _interaction;
|
private readonly IIdentityServerInteractionService _interaction;
|
||||||
private readonly IClientStore _clientStore;
|
private readonly IClientStore _clientStore;
|
||||||
private readonly IAuthenticationSchemeProvider _schemeProvider;
|
private readonly IAuthenticationSchemeProvider _schemeProvider;
|
||||||
|
|
@ -584,7 +584,7 @@ IHtmlLocalizerFactory htmlLocalizerFactory,
|
||||||
var callbackUrl = Url.Action("ConfirmEmail", "Account",
|
var callbackUrl = Url.Action("ConfirmEmail", "Account",
|
||||||
new { userId = user.Id, code },
|
new { userId = user.Id, code },
|
||||||
protocol: authority.Scheme,
|
protocol: authority.Scheme,
|
||||||
host: authority.Host + ":" + authority.Port);
|
host: authority.Host+":"+authority.Port);
|
||||||
await _emailSender.SendEmailAsync(model.UserName, model.Email, _localizer["ConfirmYourAccountTitle"],
|
await _emailSender.SendEmailAsync(model.UserName, model.Email, _localizer["ConfirmYourAccountTitle"],
|
||||||
string.Format(_localizer["ConfirmYourAccountBody"],
|
string.Format(_localizer["ConfirmYourAccountBody"],
|
||||||
_siteSettings.Title,
|
_siteSettings.Title,
|
||||||
|
|
@ -867,7 +867,7 @@ IHtmlLocalizerFactory htmlLocalizerFactory,
|
||||||
// Username should not contain any '@'
|
// Username should not contain any '@'
|
||||||
if (model.LoginOrEmail.Contains('@'))
|
if (model.LoginOrEmail.Contains('@'))
|
||||||
{
|
{
|
||||||
user = await _dbContext.Users.FirstOrDefaultAsync(u => u.Email == model.LoginOrEmail); // || u.UserName == (model.LoginOrEmail);
|
user = await _userManager.FindByEmailAsync(model.LoginOrEmail);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue