public ActionResult Login(string returnUrl) { _databaseConnection.Dispose(); HttpContext.Session.Clear(); if (HttpContext.Session.GetString("StudioLoggedInUser") != null) { return(RedirectToAction("Dashboard", "Home")); } if (returnUrl != null) { //display notification TempData["display"] = "Your session has expired, Login to continue!"; TempData["notificationtype"] = NotificationType.Success.ToString(); } return(View()); }
public RedirectResult LogOut() { HttpContext.Session.Remove("StudioLoggedInUser"); HttpContext.Session.Remove("StudioLoggedInUserId"); HttpContext.Session.Clear(); _databaseConnection.Dispose(); HttpContext.SignOutAsync(); return(Redirect("https://camerack.com/Account/Login?returnUrl=logOut")); }