Not Getting Custom field in UserProfile

jack Ryder asked on February 24, 2014 09:09

hello all , i am not able to get customtable feild in user profile.. while i am going in profile page then i am getting all the system table field , but not getting custom field. i am getting 75 count , i ahve read all the doc. in kentico site also refer syntax for that in kentico forums,,,,but still not getting column... for reff, syntax string a = updateUser.GetValue("RelatedTo") as string; string a = updateUser.UserCustomData["RelatedTo"].ToString();

Recent Answers

Brenden Kehren answered on February 24, 2014 10:16

Have you confirmed that your updateUser object is not null or is a valid UserInfo object? Also, I'd suggest using the functions that retrieve the correct data type for you as it is a more robust solution. For instance string a = updateUser.GetStringValue("RelatedTo", "");

0 votesVote for this answer Mark as a Correct answer

Richard Sustek answered on February 25, 2014 02:31


Thank you for your message.

Could you please verify that the value is really stored in the Database for given user?

Once you are sure that the value is there, you can get it by calling GetStringValue(ColumnName, DefaultValue) method on UserInfo object.

So e.g. if you would like to get this for currently logged user try:

CurrentUser.GetStringValue("Company", "not found");

Let me know how it works.

Kind regards,

Richard Susrek

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.