public async Task ResetPasswordAsync(UserResetPasswordCommand command)
        {
            await ValidatorFactory.GetValidator <UserResetPasswordCommand>().ValidateAndThrowAsync(command);

            var user = await _readRepository.GetSingleAsync(_userFiltersProvider.ById(command.UserId));

            user.PasswordHash = command.NewPasswordHash;

            await WriteRepository.UpdateAsync(user);

            await UnitOfWork.CommitAsync();
        }
Esempio n. 2
0
 public async Task <UserResetPasswordResponse> ResetPassword(UserResetPasswordCommand command)
 {
     return(await _userResetPasswordHandler.Handle(command));
 }