- Compatible XF Versions
- 2.x
In XenForo 1, getting the user_id involved the getInstance and getUserId methods.
In XenForo 2, it's a matter of using visitor().
Code:
$user_id =XenForo_Visitor::getInstance()->getUserId();
Code:
$visitor = \XF::visitor();
$user_id =...
You do not have permission to view the full content of this resource.
Log in or register now.