Ejemplo n.º 1
0
        /// <summary>
        /// Sends an verification email for a given auth0 user.
        /// </summary>
        /// <param name="userId">The user identifier.</param>
        public void SendVerification(string userId)
        {
            var user = _repository.Queryable()
                       .Single(x => x.GlobalId == userId);

            var emailTicket       = _emailVerificationRepository.Create(userId);
            var emailVerification = new EmailVerificationMessage(_appSettings, user, emailTicket);

            _postOffice.Send(emailVerification);
        }
Ejemplo n.º 2
0
        private void SendEmail(User user, IEnumerable <Block> blocksBeingEnroledIn)
        {
            var userNotication = new User
            {
                Email         = user.Email,
                FirstName     = user.FirstName,
                Surname       = user.Surname,
                EnroledBlocks = blocksBeingEnroledIn.ToList(),
                Passes        = null
            };
            var notification = new UserEnroledInBlock(userNotication);

            _postOffice.Send(notification);
        }