MyBB Community Forums

Full Version: Retrieving a user's sessionid
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm integrating MyBB into a website via global.php, and am looking for the forum variables needed to do so. While I've had no trouble retrieving data stored in the users table, I can't seem to find a variable for sessionid/sid.

With global.php, is getting the sessionid value as simple as $mybb->user['username'], $mybb->user['uid'], etc? Or are more steps involved?
you need a query for the table mybb_session, and display SID which is the session id.

use the uid as a condition.
regards
zaher1988 Wrote:you need a query for the table mybb_session, and display SID which is the session id.

use the uid as a condition.
regards

So global.php doesn't store the user's sessionid as a variable? Gotcha.

Staying on the subject of global.php, does it or any other script contain any bbcode functionality that can be used outside the forum?
The bbcode is in inc/functions_post.php
Quote:So global.php doesn't store the user's sessionid as a variable? Gotcha.

You can access it through $session->sid