Using XenForo_Model_User functions in static function?


I have an cron job which requires a static method but I would like to use the XenForo_Model_User functions there to get the user by id.

Is there any way to do that or would I need to create my own query to get the user?

Chris D

XenForo developer
Staff member
Shouldn't be a problem. You can instantiate the user model like this:
$userModel = XenForo_Model::create('XenForo_Model_User');