public Task Handle(VerifyUserEmailCommand message)
        {
            var membership = _userContextService.GetContextByUsername <Membership>(message.Username).Result;

            Debug.Assert(membership != null, "membership != null");
            membership.IsEmailConfirmed = true;
            membership.IsLocked         = false;
            return(Task.CompletedTask);
        }
Ejemplo n.º 2
0
 public Task <Result <User> > Handle(VerifyUserEmailCommand command, CancellationToken cancellationToken)
 => _unitOfWork
 .Get <User>(command.UserId)
 .OnSuccess(user => user.CompleateRegistration(command.VerificationToken))
 .OnSuccess(async user => await _unitOfWork.Compleate());
Ejemplo n.º 3
0
 public Task Handle(VerifyUserEmailCommand command)
 {
     _graphStore.Execute($"MATCH (u:User {{ Id:'{command.Id}'}}) SET u.isActive = true RETURN u");
     return(Task.CompletedTask);
 }