public ActionResult ResetPassword(string i, string t)
        {
            var user = _userContextService.GetCurrentContext();

            if (user.IsCofoundryUser())
            {
                return(GetLoggedInDefaultRedirectAction());
            }

            var request = _authenticationHelper.IsPasswordRequestValid(this, i, t, new CofoundryAdminUserArea());

            if (!request.IsValid)
            {
                return(View("ResetPasswordRequestInvalid", request));
            }

            var vm = new CompletePasswordResetViewModel();

            vm.UserPasswordResetRequestId = i;
            vm.Token = t;

            var viewPath = ViewPathFormatter.View(CONTROLLER_NAME, nameof(ResetPassword));

            return(View(viewPath, vm));
        }
Exemple #2
0
        public ActionResult ResetPassword(string i, string t)
        {
            var request = _authenticationHelper.IsPasswordRequestValid(this, i, t, new CofoundryAdminUserArea());

            if (!request.IsValid)
            {
                return(View("ResetPasswordRequestInvalid", request));
            }

            var vm = new CompletePasswordResetViewModel();

            vm.UserPasswordResetRequestId = i;
            vm.Token = t;

            var viewPath = ViewPathFormatter.View(CONTROLLER_NAME, nameof(ResetPassword));

            return(View(viewPath, vm));
        }