PDA

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

Dave
12-25-2015, 01:09 PM
$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;