MyBB Community Forums

Full Version: Fetching Custom Profile Fields on Member Profiles
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am doing a plugin modification which I've gotten to work quite well in a member's User CP; it grabs custom profile field "fid4". I want to grab this same field for an identical script in a different location.

Basically, which variable should I use to get a member's custom field while in their public profile? I'm currently using the "member_profile_start" hook to introduce my code. What am I doing wrong?

Thanks.
If you use the hook 'member_profile_end' you should be able to get the Custom Profile Fields through $userfields (make sure you globalize the $userfields var)

// Example
// Custom Profile Field #4
$fid4 = $userfields['fid4'];
(2009-10-23, 08:52 PM)LeX- Wrote: [ -> ]If you use the hook 'member_profile_end' you should be able to get the Custom Profile Fields through $userfields (make sure you globalize the $userfields var)

// Example
// Custom Profile Field #4
$fid4 = $userfields['fid4'];

Worked like a charm; thanks very much Lex!