public User PromoteGuest(User guest, string email, string password)
 {
     guest.Email = email;
       SetCredentials(guest, password);
       guest.AddRole(_roleService.Customer());
       guest.RemoveRole(_roleService.Guest());
       _userService.UpdateUser(guest);
       _authService.Reauthenticate(guest);
       return guest;
 }
 public User RegisterCustomer(Organization organization, User user, string password, string firstName, string lastName, string IATA, string affiliation)
 {
     // assumes an unsaved, in-memory user
       SetCredentials(user, password);
       user.FirstName = firstName;
       user.LastName = lastName;
       user.OrganizationId = organization.Id;
       user.IATA = IATA;
       user.Affiliation = affiliation;
       user.AddRole(_roleService.Customer());
       _userService.AddUser(user);
       _authService.Login(organization, user.Email, password, false);
       return user;
 }
 public User RegisterGuest(Organization organization)
 {
     var guest = new User
     {
       IsActive = true,
       OrganizationId = organization.Id
     };
       guest.AddRole(_roleService.Guest());
       _userService.AddUser(guest);
       _authService.SetAuthenticated(guest);
       return guest;
 }