StarRiver Member Dec 26, 2018 #1 I've been trying PHP: $this->_getForumWatchModel()->getUserForumWatchByForumId($user['user_id'], $node_id) but I'm getting "undefined function" errors. Thanks!
I've been trying PHP: $this->_getForumWatchModel()->getUserForumWatchByForumId($user['user_id'], $node_id) but I'm getting "undefined function" errors. Thanks!
P PatM Member Dec 26, 2018 #2 Is _getForumWatchModel() function defined? You can try using the following code instead. PHP: $this->getModelFromCache('XenForo_Model_ForumWatch')->getUserForumWatchByForumId($user['user_id'], $node_id)
Is _getForumWatchModel() function defined? You can try using the following code instead. PHP: $this->getModelFromCache('XenForo_Model_ForumWatch')->getUserForumWatchByForumId($user['user_id'], $node_id)
StarRiver Member Dec 26, 2018 #3 That worked. Thanks! And yes, Code: _getForumWatchModel() is defined in library > Xenforo > ControllerPublic > Watched.php
That worked. Thanks! And yes, Code: _getForumWatchModel() is defined in library > Xenforo > ControllerPublic > Watched.php
P PatM Member Dec 27, 2018 #4 Good to know. If you weren't extending that particular class, XenForo_ControllerPublic_Watched, that function would be undefined in the context of your code.
Good to know. If you weren't extending that particular class, XenForo_ControllerPublic_Watched, that function would be undefined in the context of your code.