Create XenForo user account from PHP script

lol768

Active member
I need to be able to create a new user account from a separate PHP script, that will be provided details e.g. username from GET variables.

PHP:
//Register account
$fileDir = './xf/';
require ($fileDir . '/library/XenForo/Autoloader.php');
XenForo_Autoloader::getInstance()->setupAutoloader($fileDir . '/library');
XenForo_Application::initialize($fileDir . '/library/', $fileDir);
$request = new Zend_Controller_Request_Http();
$request->setBasePath('/community');
$session = XenForo_Session::startPublicSession($request);
$userModel = XenForo_Model::create('XenForo_Model_User');
//Create user here

How would I go about doing this?
 
The Tapatalk bridge code is probably the best example of how to init and make calls to xenforo from an outside script
 
The Tapatalk bridge code is probably the best example of how to init and make calls to xenforo from an outside script
I'm able to edit user information and get info like alert numbers, but the registration code is quite complicated and designed for processing the registration form. The Tapatalk bridge doesn't include much code (if any) on registration.
 
Back
Top Bottom