summaryrefslogtreecommitdiff
path: root/Project-Unite/Controllers/AccountController.cs
diff options
context:
space:
mode:
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();
}