API Birth"D"ay ISSUE, doesn't save Birthday

API Birth"D"ay ISSUE, doesn't save Birthday

This question is not answered

I'm using the API to save the birthdate, it appears to save but doesn't reflect in CommunityServer Site.
When debugging the API the correct birthdate is saved and returned. When viewing the profile in in CommunityServer the value is not saved. I also confirmed the value is not getting set in the cs_User_ProfileData table. However when I save the Birthdate in the control panel Membership Administration then the community server profile page displays the correct birthdate.

What am I doing wrong with the API? All other values save.

My code:

csApiServiceAdmin =  new Service (communityServerAPISiteUrl, communityServerAPIUsername, communityServerAPISiteKey, communityServerAPIUsername);

PagedList<User> results = csApiServiceAdmin.Membership.GetUsers(uq);

User user = results[0];

 

csUser.Username = userName;
csUser.Password = password;
csUser.PrivateEmail = privateEmail;
csUser.DisplayName = displayName; DateTime parseDate = new DateTime();
if (DateTime.TryParse(birthday, out parseDate))
csUser.Birthday = parseDate.Date;
else
csUser.Birthday = DateTime.MinValue;

DateTime
parseDate = new DateTime();
if (DateTime.TryParse(birthday, out parseDate))
csUser.Birthday = parseDate.Date;
else
csUser.Birthday = DateTime.MinValue;

user  = csApiServiceAdmin.Membership.UpdateUser(user);

 user  = csApiServiceAdmin.Membership.UpdateUser(user);

 

 

Verified Answer
  • SHOWS THAT API HAS SOME ISSUE:

    More Information.. Using SQL profiler I found the Rest API calls the following sql:

    exec dbo.cs_Profile_UserData_AddUpdate @UserId=2100,@Fields=N'<fields><field key="Location">asldkfj, AL</field><field key="Occupation"></field><field key="Hobbies"></field><field key="BirthDay">1977-07-11 00:00:00</field><field key="Gender">NotSet</field><field key="Blog"></field><field key="Gallery"></field><field key="Public Email">aaaaa@aaaaaaaa.com</field><field key="Windows Live IM"></field><field key="AOL IM"></field><field key="Yahoo IM"></field><field key="Website"></field><field key="Language">en-US</field><field key="Birthday">1990-10-30 18:26:00</field></fields>'

    NOTE TWO BIRTHDAY VALUES!!!

    Birthday 1990-10-30 was done through control panel

    BirthDay 1977-07-11 was done through API

    Why does the API save as BirthDay, with capital "D"

  • Can you tell me what version of Telligent Community you are using - telligent.com/.../view-your-version-of-telligent-community.aspx ?

  • In theory the latest version: Your version: 5.0.40807.7666

    Some more information, we have Age added to our profile data. Some how it's calculated from Birthday (lower "d" for day)

    How do I get Age to use BirthDay (uppercase "D" for day) It seems the API will always set BirthDay with upper case.

    Whats the expected value for Birthday values in cs_Profile_Fields?

    I beleive its this:

    3 6 Birthday False Birthday

    Even with these values the API is creating BirthDay values, any idea's? Like do I have an old API dll?

All Replies
  • SHOWS THAT API HAS SOME ISSUE:

    More Information.. Using SQL profiler I found the Rest API calls the following sql:

    exec dbo.cs_Profile_UserData_AddUpdate @UserId=2100,@Fields=N'<fields><field key="Location">asldkfj, AL</field><field key="Occupation"></field><field key="Hobbies"></field><field key="BirthDay">1977-07-11 00:00:00</field><field key="Gender">NotSet</field><field key="Blog"></field><field key="Gallery"></field><field key="Public Email">aaaaa@aaaaaaaa.com</field><field key="Windows Live IM"></field><field key="AOL IM"></field><field key="Yahoo IM"></field><field key="Website"></field><field key="Language">en-US</field><field key="Birthday">1990-10-30 18:26:00</field></fields>'

    NOTE TWO BIRTHDAY VALUES!!!

    Birthday 1990-10-30 was done through control panel

    BirthDay 1977-07-11 was done through API

    Why does the API save as BirthDay, with capital "D"

  • Can you tell me what version of Telligent Community you are using - telligent.com/.../view-your-version-of-telligent-community.aspx ?

  • In theory the latest version: Your version: 5.0.40807.7666

    Some more information, we have Age added to our profile data. Some how it's calculated from Birthday (lower "d" for day)

    How do I get Age to use BirthDay (uppercase "D" for day) It seems the API will always set BirthDay with upper case.

    Whats the expected value for Birthday values in cs_Profile_Fields?

    I beleive its this:

    3 6 Birthday False Birthday

    Even with these values the API is creating BirthDay values, any idea's? Like do I have an old API dll?