I had this working for phpbb, but the only addition that was needed was inclusion in a group, you can use the functions but you have to define these before hand ie,
<?php
define('IN_PHPBB', true);
$phpbb_root_path = 'pathtoroot/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.php');
include($phpbb_root_path . 'includes/functions_user.php');
include($phpbb_root_path . 'includes/ucp/ucp_register.php');
$password='pword';
$username='uname';
$username_clean=strtolower($username);
$user_email='email@email.net';
$sql_ary = array(
'username' => $username,
'username_clean' => $username_clean,
'user_password' => phpbb_hash($password),
'user_pass_convert' => 0,
'user_email' => $user_email,
'user_email_hash' => crc32(strtolower($user_email)) . strlen($user_email),
'group_id' => 2,
'user_type' => 0,
);
user_add($sql_ary);
?>
I kept getting a template error but never managed to find the time to sort it out. Clearly you would add in the variables from the defined vms data not whats above.