MyBB Community Forums

Full Version: Trying to integrate my website with mybb. please help me.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Dear MyBB's users,

I want my website and my mybb board to be connected.
I googled and made the integration, and I'm able to get a username id, as long as I specify their ID, but nothing happens when I'm using the function as explained.

What i'm trying to do is verify a connection of one to the forums, via my website, and then show their name.

Here's my code, as well as my attemts to get a username:


define('IN_MYBB', NULL);
require_once 'forums/global.php';
require_once 'forums/class.MyBBIntegrator.php';
$MyBBI = new MyBBIntegrator($mybb, $db, $cache, $plugins, $lang, $config); 

$user = get_user($uid);

while ($forum_user = mysqli_fetch_array($user))
{
echo $forum_user['username'];
}

Please help me.
Thanks alot.

Please?
$user should be an array holding the user data.

If not, aren't you able to use $MyBBI->db->fetch_array() instead of mysqli_fetch_array() ? Or $MyBBI->getUser($uid) ?

Check the official documentation for reference.
http://phpdave.com/MyBBIntegrator/Examples/Users