protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { this.ProfileRedirect(Constants.UserPermission.InternationalUser, null, true); } else { //this.ReturnRedirect(); } uxEmailAddress.Attributes["placeholder"] = DictionaryConstants.EnterEmailAddressWatermark; uxPassword.Attributes["placeholder"] = DictionaryConstants.EnterPasswordWatermark; uxSignIn.Text = DictionaryConstants.SignInButtonText; SignInPageItem context = (SignInPageItem)Sitecore.Context.Item; uxForgotPassword.NavigateUrl = ForgotPasswordItem.GetForgotPassword().GetUrl(); uxForgotPassword.Text = context.ForgotPasswordText; this.Page.Form.DefaultButton = this.uxSignIn.UniqueID; if (!string.IsNullOrEmpty(AccessToken)) { doLogin(); } }
public async Task <ActionResult> ForgotPassword(ForgotPasswordItem model) { if (ModelState.IsValid) { var result = await userComponent.ForgotPassword(HttpContext.GetOwinContext(), Request, model); switch (result) { case 0: return(View("ForgotPasswordConfirmation")); case 1: return(RedirectToAction("ForgotPasswordConfirmation", "Login")); case -1: return(View(model)); } } return(View(model)); }