PDA

View Full Version : user_id from SESSION/COOKIE


Anarchy
01-25-2005, 10:38 AM
Pulling user_id from vbulletin session/cookie

Ok im trying to create an area of my site, not withing vbulletin templates but would like it to pull the user_id of the logged in user from the cookie/session.

How would i go about this?

sabret00the
01-25-2005, 10:41 AM
couldn't you just include the global.php and then user the $bbuserinfo array?

failing that use the $_SESSION or $_COOKIE super global.

the most secure would be to use the global.php method.

Dean C
01-25-2005, 02:13 PM
Include global.php and it's accesabile via $bbuserinfo['userid'], if that variable is set the user is logged in, if it's not they're logged out :)