MyBB Community Forums

Full Version: Custom fields in profile
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello.
I want to show a custom field in user profile. but I must check it before show. so, I write a code to check it and add it to "member.php", "Profile" section. ( Custom field id=9, it has 2 value: "Yes" and "No" and it isn't hidden):
if ($memprofile['fid9'] == "Yes") { $abcd = "He/She chooses Yes" }
else { $abcd = "He/She chooses No or he/she doesn't know" }
After, I choose "Yes" for this field in my control panel.
And when I go to my profile, I see "He/She chooses Yes".
But when I log out and go to my profile as guest or another user, I see "He/She chooses No or he/she doesn't know".
What can I do????
Try to use $userfields variable.
How to use this variable? ( with $userfields[fid9] not works )
In which part of the member.php file you added the code? What code exactly you added there?