PHP Code:
$password = "test";
define('VB_AREA', 'External');
define('SKIP_SESSIONCREATE', 1);
define('SKIP_USERINFO', 1);
define('CWD', 'forum');
require_once(CWD . '/includes/init.php');
$newuser =& datamanager_init('User', $vbulletin, ERRTYPE_ARRAY);
$newuser->set('username', $_POST['username']);
$newuser->set('email', $_POST['email']);
$newuser->set('password', $password);
$newuser->set('usergroupid', 2);
$erros = $newuser->errors;
$newuserid = $newuser->save();
If username or email already exists, this error return to me:
Code:
Unable to proceed with save while $errors array is not empty in class vB_DataManager_User in /home/blabla/www/forum/includes/class_dm.php on line 849
There's a way to fix it?
--------------- Added [DATE]1272453238[/DATE] at [TIME]1272453238[/TIME] ---------------
Solved :~