Esempio n. 1
0
        private LoginViewModel LoadBody(string returnUrl, LoginViewModel model = null)
        {
            model = model == null ? new LoginViewModel() : model;
            string referer = Request.Headers["Referer"].ToString();

            if (string.IsNullOrEmpty(returnUrl) && !string.IsNullOrEmpty(referer))
            {
                returnUrl = referer;
            }
            model.ReturnUrl        = returnUrl;
            model.RegistrationUrl  = Helper.Action("Index", "Registration");
            model.ResetPasswordUrl = Helper.Action("Index", "ResetPassword");
            return(model);
        }