MyBB Community Forums

Full Version: $myBB variable listing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've been looking everywhere for a list of all of my $myBB's variables and functions, but there seems to be a lack of a full list. I've found this, but it doesn't go into detail in the user and usergroup arrays, which are the two most important.

Does anyone have a list of the various variables in which the $mybb->user and $mybb->usergroup possess?

And maybe for 1.6, we could get a full list of all of myBB's variables for referencing? Wink
I guess it fetches all the fields of user/usergroup table. Just look at the fields of these 2 table.
I think $user may, as I know there's user['uid'] and user['username'], but I'm pretty sure the usergroup array has things like isAdmin, which isn't in the usergroup table.
$mybb is a variable (actually I believe it is an object variable) and the various fields and such could easily be dumped from it with var_dump($mybb->user); or whatever portion you want dumped.
print_r($mybb);
$mybb->usergroup holds all of the fields from the usergroup table.
$mybb->usergroup is an amalgamation of the current user's permissions in the format of the usergroup table. You can use $mybb->usergroup['cancp'] to check if the user is in an administrative usergroup.