Quote:
Originally Posted by SirAdrian
PHP Code:
chdir('./path/to/global.php/'); //optional
include('./global.php');
if (!$bbuserinfo['userid'])
{
print_no_permisson();
}
else
{
$username = $bbuserinfo['username'];
}
chdir('./path/back/to/your/scripts'); //optional
You can still use the $bbuserinfo array to access user info. The chdir stuff is only necessary if vbulletin isn't in the same directory.
|
when i try this i get nothing, it seems like im not logged in but i am..
<?
chdir('../forums/'); //optional
include('global.php');
if (!$bbuserinfo['userid'])
{
echo "user id =".$bbuserinfo['userid']."</br>";
echo "username = ".$bbuserinfo['username'];
}
else
{
$username = $bbuserinfo['username'];
echo "user id =".$bbuserinfo['userid']."</br>";
echo "username = ".$bbuserinfo['username'];
}
?>
result is:
user id =
username =