Daniel Hood
Well-known member
Is there a way to get User info for user's you're not logged in as through an external script?
To be more clear: I know how to get the user's info of the user logged in by doing this
But I'm trying to make the get_info function get it based on user id instead of just current visitor.
To be more clear: I know how to get the user's info of the user logged in by doing this
Code:
require ($this->fileDir . '/library/XenForo/Autoloader.php');
XenForo_Autoloader::getInstance()->setupAutoloader($this->fileDir . '/library');
/**
* initialize
*/
XenForo_Application::initialize($this->fileDir . '/library', $this->fileDir);
XenForo_Session::startPublicSession();
$this->xfUser = XenForo_Visitor::getInstance();
if (is_numeric($this->xfUser->getUserId()) && $this->xfUser->getUserId() > 0)
{
$this->get_info($this->xfUser->getUserId());
return true;
}
else
{
return false;
}