Page 1 of 1

phpBB User Levels

Posted: Fri Jul 08, 2005 10:01 am
by Majoraslayer
I posted this question on phpbb.com, but once again no one can help me. It should be a very simple question for anyone that knows how phpBB works, so I'll post it here as well. Thanks to anyone who can help!
Myself On phpbb.com wrote: I've managed to extend sessions outside of phpBB on my site thanks to the guide. Everything is working great. Now I need to know, how do I check the user level? I found the user level numbers once before, but what variable are they being assigned to? In other words, what variable do I check to check the user level (admin, mod, etc.)?

Posted: Fri Jul 08, 2005 10:34 am
by neophyte
Here's how your admin/pagestart.php file checks:

Code: Select all

if (!$userdataї'session_logged_in'])
{
	redirect(append_sid(&quote;login.$phpEx?redirect=admin/&quote;, true));
}
else if ($userdataї'user_level'] != ADMIN)//IF they're not admin.
{
	message_die(GENERAL_MESSAGE, $langї'Not_admin']);
}
Hope that helps.

Posted: Fri Jul 08, 2005 10:44 am
by Majoraslayer
That tells me exactly what I needed to know. You rock neophyte, thanks for helping me out again!

Posted: Fri Jul 08, 2005 10:49 am
by neophyte
No problem. Glad to help. :D