Thank you Lynne and tbworld. I did see thread 82836, but was unable to run it successfully. SInce it was an old thread and I am running 4.2.2 I raised this again.
It did succeed now: I placed this script in the root directory of my vbulletin tree and it now did run, both from a url call as well as from the command line. Thanks for your patience and help.
Peter
<?php
define('VB_AREA', 'External');
define('SKIP_SESSIONCREATE', 1);
define('SKIP_USERINFO', 1);
define('CWD', '/pathtomyvbulletin');
require_once(CWD . '/includes/init.php');
$newuser =& datamanager_init('User', $vbulletin, ERRTYPE_ARRAY);
$newuser->set('username', 'Auto User');
$newuser->set('email', 'myuser@email.com');
$newuser->set('password', 'verysecret');
$newuser->set('usergroupid', 2);
$newuserid = $newuser->save();
?>
|