//JDR: Set path for user to be redirected after loggin, this is also used to send user to a page they atempted to acces but was not loggedIn public static void SetLoggedInPathLocation(System.Web.Mvc.Controller CurrentController) { string Controller = CurrentController.ControllerContext.RouteData.Values["controller"].ToString(); string Action = CurrentController.ControllerContext.RouteData.Values["action"].ToString(); UserAccount.SetLoggedInPathLocation(Controller, Action); }
//JDR: Overload 2: Verify if active user in seccion, also set loggedInPathLocation public static bool IsLoggedIn(System.Web.Mvc.Controller CurrentController) { if (UserAccount.IsLoggedIn()) { return(true); } //JDR: user is not loggedIn so Set LoggedInLocation for when he logges in UserAccount.SetLoggedInPathLocation(CurrentController); return(false); }