By Kevin on Wednesday, 21 January 2015
Replies 1
Likes 0
Views 1K
Votes 0
Would love to have a quick 1-line sample each for setting/getting the user profile boolean field ( and if you have time maybe for all the standard fields).

I'm using the references in the documentation on retrieving the User Object and setting custom profile field for textbox items with great success but could use at least a pointer to code where the others are actually used too.

FYI I did find information for creating new custom fields but not as much on using and working with the standard fields.
Hello Eileen,

Here is the sample to get the standard field from user. I use Address as an example here. In the backend you can see this Unique Key field: http://screen.stackideas.com/2015-01-21_1216.png . Means that to get the address data, you can use this code:


$user->getFieldData('address');


Hope this helps.
·
Wednesday, 21 January 2015 12:23
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post