I'm trying to create a custom form for user registration and I'm stuck. I appreciate if anyone could help me out a bit. I'm not an expert coder but I try to read and put pieces together.
Here is the code that I have but it is not working. I'm not sure what I'm doing wrong here.
PHP Code:
// Path to vBulletin installation
$vbpath = 'forum';
// Start script
require_once($vbpath . '/includes/vb5/autoloader.php');
vB5_Autoloader::register($vbpath);
//init the vBulletin system
require_once($vbpath . '/core/vb/vb.php');
vB::init();
//get user info
$user ['username'] = $_POST['username'];
$user ['email'] = $_POST['email'];
//Create new user
$userApi = vB_Api::instance('user');
$userId = $userApi->save(0, $_POST['password'], $user, array(), array(), array());