having to change password from authenticated access

This commit is contained in:
2019-01-25 17:31:07 +00:00
parent 6de8082b2c
commit 7e7ba31b61
3 changed files with 16 additions and 3 deletions

View File

@ -430,8 +430,13 @@ namespace Yavsc.Controllers
// GET: /Account/ForgotPassword
[HttpGet]
[AllowAnonymous]
public IActionResult ForgotPassword()
public async Task<IActionResult> ForgotPassword()
{
if (User.Identity.IsAuthenticated)
ViewBag.UserEmail = ( await _dbContext.Users.SingleAsync(
u => u.Id == User.GetUserId()
) ).Email;
return View();
}