get username logged in help

Glacksy

Member
i want to get the logged in user and past it in to this simple line of code
where "username" is the logged in user ;)
Code:
if(!isset($user)) $user = "username";

would it be possible to get custom profile "lines" or "bars" not sure what i shall call it, but you know, like "Location:"
 
In your PHP code you can use this to access the username of the logged in user:

Code:
$visitor = XenForo_Visitor::getInstance();
$user = $visitor['username'];
 
In your PHP code you can use this to access the username of the logged in user:

Code:
$visitor = XenForo_Visitor::getInstance();
$user = $visitor['username'];

nice, but it return "blank"
not sure why, maybe some other issues which is causing it tho ;)

- thanks
 
Top Bottom