private string GetAuthorId(ItemDto item, IEnumerable <WpAuthor> authors)
        {
            string authorId = null;

            // take into account a deleted author
            WpAuthor auth = authors.FirstOrDefault(a => a.user_login == item.Author);

            if (auth.user_id > 0)
            {
                authorId = auth.user_id.ToString();
            }

            return(authorId);
        }
        public WpAuthor[] WpGetAuthors(string blog_id, string username, string password)
        {
            this.ValidateUser(username, password);

            string[] usrs = Roles.GetUsersInRole(Constants.Editor);

            WpAuthor[] authors = new WpAuthor[usrs.Length];

            for (int i = 0; i < usrs.Length; i++)
            {
                MembershipUser user = Membership.GetUser(usrs[i]);

                authors[i] = new WpAuthor
                {
                    display_name = usrs[i],
                    user_login   = usrs[i],
                    user_email   = user.Email,
                    meta_value   = string.Empty
                };
            }

            return(authors);
        }