public async Task <ActionResult> DoAsync(string token) { if (RemoteUser.IsListedInSpamDatabase(this.Tenant)) { return(this.View(this.GetRazorView <AreaRegistration>("ListedInSpamDatabase.cshtml", this.Tenant))); } if (string.IsNullOrWhiteSpace(token)) { return(this.Redirect("/site/404")); } var reset = await ResetRequests.GetIfActiveAsync(this.Tenant, token).ConfigureAwait(true); if (reset == null) { return(this.Redirect("/site/404")); } return(this.View(this.GetRazorView <AreaRegistration>("Reset/Do.cshtml", this.Tenant))); }
public async Task <ActionResult> DoAsync() { string token = this.Request.QueryString["token"]; string password = this.Request.QueryString["password"]; if (string.IsNullOrWhiteSpace(token) || string.IsNullOrWhiteSpace(password)) { return(this.Json(false)); } var reset = await ResetRequests.GetIfActiveAsync(this.Tenant, token).ConfigureAwait(true); if (reset != null) { await ResetRequests.CompleteResetAsync(this.Tenant, token, password).ConfigureAwait(true); return(this.Json(true)); } return(this.Json(false)); }