View Full Version : PHP code to determine user status
Fabsboards
05-22-2007, 04:54 PM
I want to create a few web pages for our users with admin status.
Is it possible to use PHP to determine whether or not a user is logged in, and what type of user they are?
Links to sample code would be greatly appreciated.
We are currently running v. 3.0.7, but plan to upgrade in the near future.
Fabsboards
05-31-2007, 01:06 AM
Anybody? I thought this would be simple.
Fabsboards
06-02-2007, 09:17 PM
Does anyone actually read these messages???
Dismounted
06-03-2007, 03:22 AM
We do read these messages....It's only because you're using 3.0.x that it's going to be hard to get a reply.
Fabsboards
06-03-2007, 05:46 AM
We do read these messages....It's only because you're using 3.0.x that it's going to be hard to get a reply.
Thanks! I'll get updated this weekend. Then I'll be back!
Fabsboards
07-21-2007, 04:39 PM
Okay, we upgraded our license and upgraded to 3.6.7.
I'm looking for PHP code to determine if someone is logged in, and what kind of user they are. Are there any example files I can use?
nexialys
07-21-2007, 06:10 PM
the vBulletin code for logged in verification is simple:
if($vbulletin->userinfo['userid']) {
this user is logged in
}
and for examples... all the vBulletin core files have authentication for permissions, sessions and actions... you are not very clear on what you need to know, so it is complicated to have examples...
Kirk Y
07-21-2007, 11:05 PM
if (is_member_of($vbulletin->userinfo, 6)){
This user is an Administrator.
}
ragtek
07-21-2007, 11:09 PM
if will also work if($vbulletin->userinfo['permissions']['adminpermissions']){..}
or if(!$show['admincplink'])print_no_permission();
i think there are many ways
but not all are correct, because, there are many different "admintypes" (i hope someone can explain more what i think*g*
i mean because of the adminpermissions..)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.