On a custom page that is called periodically with ajax, I would like to check the userid of the user. (I want to compare it with a variable to show a ban button in my chat application).
So this is what I have:
PHP Code:
chdir('../../forum');
require_once('./global.php');
echo "vbuserinfo: ".$vbulletin->userinfo['userid'];
die();
But vbulletin-userinfo['userid'] is zero ("vbuserinfo: 0").
I am logged in at the forum and global.php is found. I don't understand why it's not working.