Solved: 11 Years, 4 Weeks ago $myBB variable listing
#1
Solved: 11 Years, 4 Weeks ago
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
#2
Solved: 11 Years, 4 Weeks ago
I guess it fetches all the fields of user/usergroup table. Just look at the fields of these 2 table.
ProPortal: A More Functional Portal.
Click here for detailed information.
#3
Solved: 11 Years, 4 Weeks ago
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.
#4
Solved: 11 Years, 4 Weeks ago
$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.
#5
Solved: 11 Years, 4 Weeks ago
print_r($mybb);
#6
Solved: 11 Years, 4 Weeks ago
$mybb->usergroup holds all of the fields from the usergroup table.
#7
Solved: 11 Years, 4 Weeks ago
$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.
Dennis Tsang
Former MyBB Team Member
Web: http://dennistt.net


Forum Jump:


Users browsing this thread: 1 Guest(s)