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(); }