core_basic
09-29-2011, 06:17 PM
Hello. I have a page outside of my vbulletin directory, and im trying to see if users are logged in, and if so to dispay some infornmation.
Is there something wrong with the code below? I just can't figure it out!
<?
$curdir = getcwd();
chdir('./forums/');
require_once('global.php');
chdir($curdir);
if (!empty($vbulletin->userinfo['userid']))
{
// if logged in
}
else
{
// if not logged in
}
?>
Is there something wrong with the code below? I just can't figure it out!
<?
$curdir = getcwd();
chdir('./forums/');
require_once('global.php');
chdir($curdir);
if (!empty($vbulletin->userinfo['userid']))
{
// if logged in
}
else
{
// if not logged in
}
?>