mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-01-22 17:22:15 +00:00
prevent logged in user from logging in
This commit is contained in:
parent
1cc5a79c8c
commit
bc56237435
1 changed files with 4 additions and 0 deletions
|
@ -84,6 +84,8 @@ await UserManager.SendEmailAsync(uid, "Confirm your account", $@"### Please conf
|
|||
[AllowAnonymous]
|
||||
public ActionResult Login(string returnUrl)
|
||||
{
|
||||
if (Request.IsAuthenticated)
|
||||
return Redirect(returnUrl);
|
||||
ViewBag.ReturnUrl = returnUrl;
|
||||
return View();
|
||||
}
|
||||
|
@ -174,6 +176,8 @@ public async Task<ActionResult> VerifyCode(VerifyCodeViewModel model)
|
|||
[AllowAnonymous]
|
||||
public ActionResult Register()
|
||||
{
|
||||
if (Request.IsAuthenticated)
|
||||
return RedirectToAction("Index", "Ho,e");
|
||||
return View();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue