public virtual async Task <JsonResult> SendPasswordResetLink(SendPasswordResetLinkViewModel model) { UnitOfWorkManager.Current.SetTenantId(await GetTenantIdOrDefault(model.TenancyName)); var user = await GetUserByChecking(model.EmailAddress); user.SetNewPasswordResetCode(); await _userEmailer.SendPasswordResetLinkAsync(user); await UnitOfWorkManager.Current.SaveChangesAsync(); return(Json(new AjaxResponse())); }
public virtual async Task <JsonResult> SendPasswordResetLink(SendPasswordResetLinkViewModel model) { CheckModelState(); _unitOfWorkManager.Current.DisableFilter(AbpDataFilters.MayHaveTenant); var user = await GetUserByChecking(model.EmailAddress, model.TenancyName); user.SetNewPasswordResetCode(); await _userEmailer.SendPasswordResetLinkAsync(user); return(Json(new MvcAjaxResponse())); }
public virtual async Task <JsonResult> SendPasswordResetLink(SendPasswordResetLinkViewModel model) { this.CheckModelState(); IActiveUnitOfWork current = this._unitOfWorkManager.Current; current.DisableFilter(new string[] { "MayHaveTenant" }); FuelWerx.Authorization.Users.User userByChecking = await this.GetUserByChecking(model.EmailAddress, model.TenancyName); FuelWerx.Authorization.Users.User user = userByChecking; user.SetNewPasswordResetCode(); await this._userEmailer.SendPasswordResetLinkAsync(user); return(this.Json(new MvcAjaxResponse())); }