SirWill Member Jan 16, 2016 #1 hey, 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?
hey, 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 Jan 16, 2016 #2 Shouldn't be a problem. You can instantiate the user model like this: PHP: $userModel = XenForo_Model::create('XenForo_Model_User');
Shouldn't be a problem. You can instantiate the user model like this: PHP: $userModel = XenForo_Model::create('XenForo_Model_User');
SirWill Member Jan 16, 2016 #3 Chris D said: Shouldn't be a problem. You can instantiate the user model like this: PHP: $userModel = XenForo_Model::create('XenForo_Model_User'); Click to expand... Ahh, thanks. That works.
Chris D said: Shouldn't be a problem. You can instantiate the user model like this: PHP: $userModel = XenForo_Model::create('XenForo_Model_User'); Click to expand... Ahh, thanks. That works.