diff options
| author | Michael <[email protected]> | 2017-04-21 19:56:40 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-04-21 19:56:40 -0400 |
| commit | bc5623743500eb9a37bdcad7a324c6ad8f517685 (patch) | |
| tree | 046487c8e93739568e65152a7e78014ecc853860 /Project-Unite/Controllers/AccountController.cs | |
| parent | 1cc5a79c8c14777052083ae607eb1ad3626b4551 (diff) | |
| download | project-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.cs | 4 |
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(); } |
