Skip to content

Commit

Permalink
PT-9881: Locale param doesn't apply on emailConfirmation notification (
Browse files Browse the repository at this point in the history
…#43)

fix: ocale param doesn't apply on emailConfirmation notification
  • Loading branch information
OlegoO authored Jan 17, 2023
1 parent 8366098 commit f483d2a
Show file tree
Hide file tree
Showing 6 changed files with 282 additions and 143 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,26 @@ namespace VirtoCommerce.ProfileExperienceApiModule.Data.Commands
public class CreateUserCommandHandler : IRequestHandler<CreateUserCommand, IdentityResult>
{
private readonly IAccountService _accountService;
private readonly IMediator _mediator;

public CreateUserCommandHandler(IAccountService accountService)
public CreateUserCommandHandler(IAccountService accountService, IMediator mediator)
{
_accountService = accountService;
_mediator = mediator;
}

public virtual Task<IdentityResult> Handle(CreateUserCommand request, CancellationToken cancellationToken)
public virtual async Task<IdentityResult> Handle(CreateUserCommand request, CancellationToken cancellationToken)
{
return _accountService.CreateAccountAsync(request.ApplicationUser);
var result = await _accountService.CreateAccountAsync(request.ApplicationUser);

if (result.Succeeded)
{
// Send Email Verification
await _mediator.Send(new SendVerifyEmailCommand(request.ApplicationUser.StoreId, string.Empty, request.ApplicationUser.Email), cancellationToken);

}

return result;
}
}
}
Loading

0 comments on commit f483d2a

Please sign in to comment.