public void ClearResetPasswordToken(CancelResetPasswordToken command) { this.ResetPasswordToken = null; this.UpdateAt = command.CreateAt; this.UpdateBy = command.CreateBy; }
public async Task<IHttpActionResult> CancelResetPasswordToken(VerifyResetPasswordTokenVM vm) { var userSecurity = _userSecurityService.Get(vm.User); if (!userSecurity.EnsoureState(UserSecurityCommand.CancelResetPasswordToken)) { return Conflict(); } CancelResetPasswordToken action = new CancelResetPasswordToken( userSecurity.UserId, DateTime.Now, userSecurity.UserId, vm.Token); ActionResponse actionResponse = await ActionBus.SendAsync<UserActionBase, CancelResetPasswordToken>(action); return Ok(ActionResponseVM.ToVM(actionResponse)); }