Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted March 4, 20159 yr First offf, great idea making this section I've got the following code to pull member data to an external website: global $member; require_once($_SERVER['DOCUMENT_ROOT'] . '/forums/init.php'); \IPS\Session\Front::i(); $member = \IPS\Member::loggedIn(); And it works fine. print_r($member); outputs a lot of useful information. However, I can't seem to find the information for custom profile fields. Where is this located, and how do you pull it?
March 4, 20159 yr Author Thanks for the answer However, I tried the following: $member_fields = $member->profileFields; print_r($member_fields); And it doesn't return anything.
March 4, 20159 yr It's a method, actually. Try:$member_fields = $member->profileFields(); print_r( $member_fields );
March 4, 20159 yr Author It's a method, actually. Try: $member_fields = $member->profileFields(); print_r( $member_fields ); Yup, that worked! Thanks a lot!
March 5, 20159 yr Author Just in case someone wants to know how to access a specific profile field, I'll post it here $member_pf = $member->profileFields(); echo $member_pf['core_pfieldgroups_3']['core_pfield_11']; As an example, that would echo the value of field 11, from within the 3rd field group. Thanks!
May 18, 20159 yr Hallo Vikestart, I'm new in IPB and not very good with php, I try to change the display of search user to add some custom field added to profile, here: core>front>search>member how could add this code in this format? Just in case someone wants to know how to access a specific profile field, I'll post it here $member_pf = $member->profileFields(); echo $member_pf['core_pfieldgroups_3']['core_pfield_11']; As an example, that would echo the value of field 11, from within the 3rd field group. Thanks! Thanks for helping
Archived
This topic is now archived and is closed to further replies.