MyBB Community Forums

Full Version: Custom Profile fields on external pages
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible that you can read the custom profile fields on a external PHP page ?

I use now

$curdir = getcwd ();
chdir('forum'); // path to MyBB
define("IN_MYBB", 1);
require './global.php';
chdir ($curdir);

This will give me the option to read out the information from the logged in user

$mybb->user['uid']

But now I also want to readout the custom profile fields from that user

Is there something like this ?

$mybb->user['fidX']
I think you've to add this:
require './inc/functions_post.php';
and then use $post['fidX']
$post won't do anything if the $post array hasn't been made.

You can query for it.

$query = $db->simple_select("userfields", "*", "ufid = '{$mybb->user['uid']}'");
while($field = $db->fetch_array($query))
{
...