Fix problem when logging out staying on the login page
This commit is contained in:
@@ -14,6 +14,10 @@ namespace MileageTraker.Web.Controllers
|
||||
[AllowAnonymous]
|
||||
public ActionResult Login(string returnUrl, string username)
|
||||
{
|
||||
if (User.Identity.IsAuthenticated)
|
||||
{
|
||||
return RedirectToAction("Index", "CreateLog");
|
||||
}
|
||||
ViewBag.ReturnUrl = returnUrl;
|
||||
return View(new LoginViewModel{Username = username});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user