For VMS you just want to pull a user from the DB table? I guess you can pull that from the pilots table, that’s essentially all findPilots() does anyway.
You have to do this though, to load in the config (sans API) for phpvms (haven’t tested it, but it should be close) - place it in the root of the phpvms install (where index.php is)
To load configs for phpVMS
define('SITE_ROOT', dirname( __FILE__ ));
include SITE_ROOT.'/core/classes/Config.class.php';
include SITE_ROOT.'/core/local.config.php';
But an alternate solution might be this… this file called userregister.php, in the phpvms root (can be wherever, really, even in the phpBB root, but somewhere the public won’t look, for security… /public_html/some/secret/path/userregister.php)
// Include phpBB stuff
$email = $_POST['email'];
$password = $_POST['password1'];
//etc
What you could do is this, from within your module/event listener, its registering the user, send the request to the above page
$cws = new CodonWebService();
$result = $cws->post('http://your-site.com/your/secret/path/userregister.php', $userinfo);
// For debug you can output $result, returns whatever the above page outputs
Which is sending $_POST (basically a form submit) to the userregister.php file. Not the most secure thing, unless you setup an htaccess to allow only your local webserver access to the userregister file. I’m sure there are better ways to sandbox the userregister, but the above comes out to be the simplest. If PHP had namespaces support earlier… oh well.
Two potential problems with this is configuration, but you’d have to do two things:
In userregister.php - make sure paths to phpBB are correct
In phpVMS - have the user add a setting called PHPBB_REGISTER_SCRIPT_URL which is the URL to the above script
And an htaccess to prevent outside access (which is tricky because you’d have to know the proper IP it will access from). I’ll think about this some more and see if there’s a better way.