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().
Once the user_id is known then the $user information is available.
In XenForo 1, getting the user_id involved the getInstance and getUserId methods.
In XenForo 2, it's a matter of using visitor().
Once the user_id is known then the $user information is available.