Newton
Member
hi AUSFIFA,I've been trying to use this class:
http://xenforo.com/community/threads/how-to-create-a-bridge.28515/#post-332676
I'm trying to log a user in using the following code:
$xenUser = appXenForo::login($email, $password);
appXenForo::setLogin($xenUser);
But I keep getting the following error:
Fatal error: Class 'XenForo_Model' not found in /home/ausfifac/public_html/inc/xenforo_functions.php on line 203
xenforo_functions.php is the appXenForo class with the additional setAvatar() function provided by JaredNZ.
The line causing the error:
$dbLoginModel = XenForo_Model::create('XenForo_Model_Login');
What would be causing this? I've set the forum directory properly and I have the Model.php file in the library/Xenforo directory.
Help would be greatly appreciated. Thanks!
you can just change your code to this,
in place of directly call XenForo_Model,you can use something like this
$db = XenForo_Application::get('db');
$cUser = $db->fetchRow("SELECT * FROM xf_user WHERE `username` = '$sUsername' LIMIT 1");