What's the best way to tell if user is logged in as ADMIN?
#1
What's the best way to tell if user is logged in as ADMIN?

i need it for my manual code and site integration

Tanks
MyBB = awesome
[Image: Lengua-fuera.png]
Reply
#2
if($mybb->user['usergroup'] == 4) {
//do blah
}
No longer involved in the MyBB project.
Reply
#3
This user has been denied support. This user has been denied support.
$mybb->usergroup['cancp']
Reply
#4
thanks to both of you,

ok so one more thing, how do i get this variable into my script? i checked out the cookie created but i see no variable set that indicates usergroup or even userid..

i do see sid <-- w/c seems to be a session id? is it? and is this the only way to get the usergroup data by via sid instead of uid?
MyBB = awesome
[Image: Lengua-fuera.png]
Reply
#5
This user has been denied support. This user has been denied support.
You get it when you include MyBB's global.php. If you want to be independent, you'll have to look at the cookie first and then talk to the database to verify that the cookies are indeed correct. Basically what MyBB does in it's init / session
Reply
#6
well, i might as well include global.php haha tnx much yo.. great help!
MyBB = awesome
[Image: Lengua-fuera.png]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)