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