How to call user information in a PHP file?

Richey

Member
Hey guys,

how can I get user information inside of a php file I include via addon?

In vBulletin it was something like:
global $vbulletin;
$username = $vbulletin['username']

How to do this in xenForo?

Have a nice weekend! :)
 

Onimua

Well-known member
PHP:
$visitor = XenForo_Visitor::getInstance();
echo $visitor['user_id']; // user id
 
Top