public ActionResult ResetPassword()
        {
            PageRouteHandler.RegisterCustomOutputCacheVariation(new ResetPasswordCacheVariation());

            var query         = this.HttpContext.Request.QueryString;
            var queryString   = query.ToString();
            var securityToken = queryString;
            var resetComplete = false;
            var error         = string.Empty;

            var index = queryString.IndexOf("&resetComplete");

            if (index > 0)
            {
                securityToken = queryString.Substring(0, index);
                resetComplete = Convert.ToBoolean(query["resetComplete"]);
                error         = query["error"];
            }

            var model = this.Model.GetResetPasswordViewModel(securityToken, resetComplete, error);

            var fullTemplateName = this.resetPasswordTemplatePrefix + this.ResetPasswordTemplate;

            return(this.View(fullTemplateName, model));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Renders appropriate view depending on the <see cref="TemplateName"/>
        /// </summary>
        /// <returns>
        /// The <see cref="ActionResult"/>.
        /// </returns>
        public ActionResult Index()
        {
            if (SystemManager.CurrentHttpContext != null)
            {
                var cacheDependentNavigationModel = this.Model as IHasCacheDependency;
                if (cacheDependentNavigationModel != null)
                {
                    this.AddCacheDependencies(cacheDependentNavigationModel.GetCacheDependencyObjects());
                }
            }

            if (this.OutputCache.VaryByAuthenticationStatus || this.OutputCache.VaryByUserRoles)
            {
                PageRouteHandler.RegisterCustomOutputCacheVariation(new NavigationOutputCacheVariation(this.OutputCache));
            }

            var fullTemplateName = this.templateNamePrefix + this.TemplateName;

            return(this.View(fullTemplateName, this.Model));
        }
Exemplo n.º 3
0
 private void RegisterCustomOutputCacheVariation()
 {
     PageRouteHandler.RegisterCustomOutputCacheVariation(new UserProfileMvcOutputCacheVariation());
 }