summaryrefslogtreecommitdiff
path: root/Project-Unite/Controllers/AccountController.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-04-21 19:56:40 -0400
committerMichael <[email protected]>2017-04-21 19:56:40 -0400
commitbc5623743500eb9a37bdcad7a324c6ad8f517685 (patch)
tree046487c8e93739568e65152a7e78014ecc853860 /Project-Unite/Controllers/AccountController.cs
parent1cc5a79c8c14777052083ae607eb1ad3626b4551 (diff)
downloadproject-unite-bc5623743500eb9a37bdcad7a324c6ad8f517685.tar.gz
project-unite-bc5623743500eb9a37bdcad7a324c6ad8f517685.tar.bz2
project-unite-bc5623743500eb9a37bdcad7a324c6ad8f517685.zip
prevent logged in user from logging in
Diffstat (limited to 'Project-Unite/Controllers/AccountController.cs')
-rw-r--r--Project-Unite/Controllers/AccountController.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Project-Unite/Controllers/AccountController.cs b/Project-Unite/Controllers/AccountController.cs
index 6309184..2eb5806 100644
--- a/Project-Unite/Controllers/AccountController.cs
+++ b/Project-Unite/Controllers/AccountController.cs
@@ -84,6 +84,8 @@ The address used to send this message is not a no-reply address. In fact, my nam
[AllowAnonymous]
public ActionResult Login(string returnUrl)
{
+ if (Request.IsAuthenticated)
+ return Redirect(returnUrl);
ViewBag.ReturnUrl = returnUrl;
return View();
}
@@ -174,6 +176,8 @@ The address used to send this message is not a no-reply address. In fact, my nam
[AllowAnonymous]
public ActionResult Register()
{
+ if (Request.IsAuthenticated)
+ return RedirectToAction("Index", "Ho,e");
return View();
}