View Full Version : how to get vbulletin session data in the parent directory
bradthor
12-25-2015, 01:06 PM
i have recently included global.php with the following code
chdir('/forum/');
include('global.php');
what code do I use to echo the username and user id in vbulletin 4 ?
Any help would be awesome .Thanks
$vbulletin->userinfo array.
MarkFL
12-25-2015, 01:09 PM
You should be able to use:
$vbulletin->userinfo['username']
$vbulletin->userinfo['userid']
bradthor
12-25-2015, 02:21 PM
Tried it but it doesn't work??
--------------- Added 1451060589 at 1451060589 ---------------
is there something wrong with this code
chdir('/forum/');
include('global.php');
--------------- Added 1451064328 at 1451064328 ---------------
fixed it with this line placed at the top of the file
global $vbulletin;
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.