View Full Version : Using sessions of vbulletin outside vbulletin
zero477
02-01-2012, 01:07 AM
Hello everyone,
I would like to give access to vbulletin users to other parts of my website using vbulletin sessions.
Does someone knows how to do this?
If you have a php script you could do something like:
require_once('./global.php');
if ($vbulletin->userinfo['userid'] == 0)
{
// guest - no permission
}
and if your non-scripts are outside the forum directory (the dir with global.php), then you need to do something like this:
$curdir = getcwd ();
chdir('/path/to/forums');
require_once('./global.php');
chdir ($curdir);
if ($vbulletin->userinfo['userid'] == 0)
{
// guest - no permission
}
zero477
02-10-2012, 12:37 AM
Thank you for your help, it has been very useful.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.