activates the "forgotten password" feature
This commit is contained in:
parent
ebb06e9141
commit
5549ef0949
2 changed files with 7 additions and 10 deletions
|
|
@ -334,11 +334,11 @@ namespace Yavsc.Controllers
|
||||||
|
|
||||||
// For more information on how to enable account confirmation and password reset please visit http://go.microsoft.com/fwlink/?LinkID=532713
|
// For more information on how to enable account confirmation and password reset please visit http://go.microsoft.com/fwlink/?LinkID=532713
|
||||||
// Send an email with this link
|
// Send an email with this link
|
||||||
//var code = await _userManager.GeneratePasswordResetTokenAsync(user);
|
var code = await _userManager.GeneratePasswordResetTokenAsync(user);
|
||||||
//var callbackUrl = Url.Action("ResetPassword", "Account", new { userId = user.Id, code = code }, protocol: HttpContext.Request.Scheme);
|
var callbackUrl = Url.Action("ResetPassword", "Account", new { userId = user.Id, code = code }, protocol: HttpContext.Request.Scheme);
|
||||||
//await _emailSender.SendEmailAsync(model.Email, "Reset Password",
|
await _emailSender.SendEmailAsync(_siteSettings,_smtpSettings,model.Email, "Reset Password",
|
||||||
// "Please reset your password by clicking here: <a href=\"" + callbackUrl + "\">link</a>");
|
"Please reset your password by clicking here: <a href=\"" + callbackUrl + "\">link</a>");
|
||||||
//return View("ForgotPasswordConfirmation");
|
return View("ForgotPasswordConfirmation");
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we got this far, something failed, redisplay form
|
// If we got this far, something failed, redisplay form
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
<h2>@ViewData["Title"].</h2>
|
<h2>@ViewData["Title"].</h2>
|
||||||
<p>
|
|
||||||
For more information on how to enable reset password please see this <a href="http://go.microsoft.com/fwlink/?LinkID=532713">article</a>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
@*<form asp-controller="Account" asp-action="ForgotPassword" method="post" class="form-horizontal" role="form">
|
<form asp-controller="Account" asp-action="ForgotPassword" method="post" class="form-horizontal" role="form">
|
||||||
<h4>Enter your email.</h4>
|
<h4>Enter your email.</h4>
|
||||||
<hr />
|
<hr />
|
||||||
<div asp-validation-summary="ValidationSummary.All" class="text-danger"></div>
|
<div asp-validation-summary="ValidationSummary.All" class="text-danger"></div>
|
||||||
|
|
@ -24,7 +21,7 @@
|
||||||
<button type="submit" class="btn btn-default">Submit</button>
|
<button type="submit" class="btn btn-default">Submit</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>*@
|
</form>
|
||||||
|
|
||||||
@section Scripts {
|
@section Scripts {
|
||||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue