2013-07-22, 10:37 AM
Hey,
I'm currently working on a site, and I want it so that when register on the site, they'll also get registered on the forum.
I tried this, but it doesn't work:
Any ideas?
I'm currently working on a site, and I want it so that when register on the site, they'll also get registered on the forum.
I tried this, but it doesn't work:
require_once "../www_forum/global.php";
require_once "../www_forum/inc/functions_post.php";
require_once "../www_forum/inc/functions_user.php";
require_once "../www_forum/inc/class_parser.php";
require_once "../www_forum/datahandlers/user.php";
$userhandler = new UserDataHandler("insert");
$user = array(
"username" => $username, //these variables are set, don't worry xD
"password" => $password,
"password2" => $password,
"email" => $email,
"email2" => $email,
"usergroup" => 2,
"referrer" => 0,
"timezone" => '0',
"language" => '',
"profile_fields" => '',
"regip" => GetIP(), //get IP is a function which returns the IP
"longregip" => my_ip2long(GetIP()),
"coppa_user" => 0,
"regcheck1" => "",
"regcheck2" => "true"
);
$user['options'] = array(
"allownotices" => 1,
"hideemail" => 1,
"subscriptionmethod" => 0,
"receivepms" => 1,
"pmnotice" => 1,
"emailpmnotify" => 0,
"invisible" => 0,
"dstcorrection" => 1
);
$userhandler->set_data($user);
$user_info = $userhandler->insert_user();
}
Any ideas?