Log in

View Full Version : Custom plugin gives blank page


t3nt3tion
10-29-2008, 08:51 PM
So, I`ve created a custom plugin, sort of a bridge.
Upon registration, it should copy the user data to another script.
This is how it looks.

$db->select_db("otherscriptdb");
$currdate = date('Y-m-d');
$query = "INSERT INTO `member` SET
`member_username` = '".$userinfo['username']."',
`member_password` = '".$userinfo['password']."',
`member_firstname` = 'First',
`member_lastname` = 'Last',
`member_address` = 'Address',
`member_city` = 'City',
`member_state` = 'State',
`member_zip` = '123456',
`member_country` = '252',
`member_phone` = '0000',
`member_fax` = '0000',
`member_email` = '".$userinfo['email']."',
`member_code` = '".addslashes(randomcodegen())."',
`member_status` = 'email_pending',
`member_add` = '$currdate',
`salt` = '".addslashes($userinfo['salt'])."'";
$db->query_write($query);
$db->select_db("forumdb");The hook I`m using is : register_addmember_complete.

--------------- Added 1225382529 at 1225382529 ---------------

Anyone any ideas ?

--------------- Added 1225382701 at 1225382701 ---------------

I also tried escaping the text with db->escape_string, same thing.

tekmiester
10-30-2008, 03:52 PM
Nope, haven't run into that one... Good luck to you though.

t3nt3tion
10-31-2008, 03:19 PM
Anyone else ?

Lynne
10-31-2008, 03:40 PM
I use that hook to do a similar thing. Instead of $userinfo['username'] try $vbulletin->GPC['username'] and similar for the other $userinfo variables.