public ActionResult ModForm(Mod mod) { TempData["user"] = SharedSupport.FilterMod(mod); if (TempData["user"] != null) { if (DBSupport.ValidateMod(mod)) { return(RedirectToAction("Chat", "Main")); } TempData["error"] = "Invalid Modname or Password!"; return(RedirectToAction("Mod")); } TempData["error"] = Request.UrlReferrer != null ? (HttpContext.Session["usernameError"] != null ? HttpContext.Session["usernameError"].ToString() : sessionExpired) : sessionExpired; HttpContext.Session.Remove("usernameError"); return(RedirectToAction("Mod")); }