1 follower Follow

.NET (surprise) - Find User info

Hi again -

So I'm making superb progress.  At this point I'm able to determine who submitted an item - now I'd like to find out info like the User's email.  So I look at the constructors in User.cs:

    public partial class User


        [DataMember(Name = "user_id", IsRequired=false)]

        public int? UserId { get; set; }

        [DataMember(Name = "mail", IsRequired=false)]

        public string Mail { get; set; }

My code:

                var rev = new Podio.API.Model.ItemRevision();

                var user = new Podio.API.Model.User();

                rev = item.InitialRevision;

                var submitter = rev.CreatedBy.Name;

                var userId = rev.CreatedBy.Id;

                user.UserId = userId;

                var email = user.Mail;

                LogFileWriteLine("submitter: " + submitter);

                LogFileWriteLine("submitter id: " + rev.CreatedBy.Id);

                LogFileWriteLine("submitter email: " + email);

But email keeps coming up null - I'd think the get;set should be getting/setting what I need:

1/27/2013 3:45:12 PM    submitter: Rich Stoldt

1/27/2013 3:45:12 PM    submitter id: 750340

1/27/2013 3:45:12 PM    submitter email:

As always, any advice is appreciated.

Rich Stoldt

Please sign in to leave a comment.

1 comment