2015-06-15, 09:59 AM
Hello,
I need to use a custom profile field in my plugin. The id for the custom profile field is 4. It is a set of radio buttons one says: Yes? the other says No? They are to be used in a if statement. All the methods below don't work for some weird reason.
I have tried all of these:
I think i did the correct thing by adding this in the function?
This is what the database looks like:
Thanks,
Desgyz
I need to use a custom profile field in my plugin. The id for the custom profile field is 4. It is a set of radio buttons one says: Yes? the other says No? They are to be used in a if statement. All the methods below don't work for some weird reason.
I have tried all of these:
$useroptq = $db->query("SELECT fid4 FROM mybb_userfields WHERE ufid=". (int)$user_info['uid']. "");
$user_opt = $db->fetch_array($useroptq);
$user_opt = $mybb->user['fid4'];
$user_opt = $userfields['fid4'];
$user_opt = $post['fid4'];
$user_opt = $_GET['profile_fields[fid4]'];
$user_opt = $GLOBALS['profile_fields']['fid4'];
if ($user_opt == "Yes?") {
//Do Stuffs
}
I think i did the correct thing by adding this in the function?
global $mybb, $db, $user_info, $userfields;
This is what the database looks like:
Thanks,
Desgyz