Esempio n. 1
0
        public void SendChangePasswordNotification(ChangePasswordNotification notification, ChangePasswordCommand command)
        {
            notification.To       = command.Email;
            notification.Password = command.Password;
            notification.Username = command.UserName;

            using (var session = usersSessionFactory.CreateContext())
            {
                var not = session.Notifications.Single(n => n.Id == (int)NotificationTypes.ChangePassword);
                notification.MessageTemplate = not.Message;
                notification.Subject         = not.Subject;
                notification.Execute();
            }
        }
 public ChangePasswordHandler(ChangePasswordNotification notification)
 {
     this.notification = notification;
 }