diff --git a/src/Yavsc/Controllers/Accounting/AccountController.cs b/src/Yavsc/Controllers/Accounting/AccountController.cs index 15efe626..94318a0a 100644 --- a/src/Yavsc/Controllers/Accounting/AccountController.cs +++ b/src/Yavsc/Controllers/Accounting/AccountController.cs @@ -430,8 +430,13 @@ namespace Yavsc.Controllers // GET: /Account/ForgotPassword [HttpGet] [AllowAnonymous] - public IActionResult ForgotPassword() + public async Task ForgotPassword() { + if (User.Identity.IsAuthenticated) + ViewBag.UserEmail = ( await _dbContext.Users.SingleAsync( + u => u.Id == User.GetUserId() + ) ).Email; + return View(); } diff --git a/src/Yavsc/Views/Account/ForgotPassword.cshtml b/src/Yavsc/Views/Account/ForgotPassword.cshtml index d09878b9..1e1e5a2d 100755 --- a/src/Yavsc/Views/Account/ForgotPassword.cshtml +++ b/src/Yavsc/Views/Account/ForgotPassword.cshtml @@ -12,7 +12,13 @@
- + @if (User.Identity.IsAuthenticated) { + + @ViewBag.UserEmail + + } else { + + }
diff --git a/src/Yavsc/Views/Manage/ChangePassword.cshtml b/src/Yavsc/Views/Manage/ChangePassword.cshtml index 38e75e77..11bc7e84 100755 --- a/src/Yavsc/Views/Manage/ChangePassword.cshtml +++ b/src/Yavsc/Views/Manage/ChangePassword.cshtml @@ -32,7 +32,9 @@
- + + + @SR["Forgot your password?"]