IList<User> ImportUsers(BlogMLBlog blog, AppService appSvc)
 {
   var users = new List<User>();
   foreach (BlogMLAuthor author in blog.Authors)
   {
     LogProgress("Processing blog author with ID={0}", author.ID);
     var user = UserRepository.GetUsersByEmail(author.Email).FirstOrDefault();
     if (user == null) user = UserRepository.GetUser(author.ID);
     if (user == null) user = UserRepository.GetUsersByName(author.Title).FirstOrDefault();
     if (user != null)
     {
       LogProgress("User '{0}' already exists in system", author.Title);
       var ids = user.Ids.ToList();
       if (!ids.Contains(author.ID)) ids.Add(author.ID);
       user.Ids = ids;
       UserRepository.UpdateUser(user);
     }
     else
     {
       LogProgress("Existing user not found, creating new user '{0}'", author.Title);
       user = new User();
       user.Name = author.Title;
       user.Email = author.Email;
       user.Ids = new[] { author.ID };
       UserRepository.CreateUser(user);
       LogProgress("Making new user '{0}' an administrator", author.Title);
       appSvc.AddAdmin(user.Ids.First());
     }
     users.Add(user);
   }
   return users;
 }