Administrators Nabeel Posted August 7, 2009 Administrators Report Share Posted August 7, 2009 Originally from this topic: http://forum.phpvms.net/index.php?topic=272.0 <?php class ForumRegister extends CodonModule { public function __construct() { CodonEvent::addListener('ForumRegister'); } public function EventListener($eventinfo) { if($eventinfo[0] == 'registration_complete') { $userinfo = $eventinfo[2]; $fname = $userinfo['firstname']; $lname = $userinfo['lastname']; $pass = $userinfo['password1']; $email = $userinfo['email']; $code = $userinfo['code']; $uinfo = PilotData::GetPilotByEmail($userinfo['email']); $code = PilotData::GetPilotCode($uinfo->code, $uinfo->pilotid); $pilot_id = $fname.$lname.$code.$pilot_id; $pilot_id_klein = strtolower($pilot_id); $passMD5 = md5($pass); $tm = time(); DB::query("INSERT INTO phpbb_users (username, username_clean, user_password, user_email, group_id, user_timezone, user_dst, user_rank, user_lang, user_colour, user_type, user_actkey, user_dateformat, user_style, user_regdate) VALUES ('".$pilot_id."', '".$pilot_id_klein."', '".$passMD5."', '".$email."', '9','0.0', '0', '2','en','0099FF','1','5BN4938HB2','D M d, Y g:i a', '2', '".$tm."')"); } } } ?> So far, confirmed working by one person. But I would feel more comfortable if it were using the phpBB API for adding users. Quote Link to comment Share on other sites More sharing options...
davehardy Posted August 21, 2009 Report Share Posted August 21, 2009 Im also using this plugin/addon its working just fine! It needs further work though. Quote Link to comment Share on other sites More sharing options...
Moderators joeri Posted August 21, 2009 Moderators Report Share Posted August 21, 2009 didn't work for me Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted August 21, 2009 Moderators Report Share Posted August 21, 2009 Works Fine for me also, one reminder both databases need to be in the same one if you know what mean Quote Link to comment Share on other sites More sharing options...
Tom Posted October 1, 2009 Report Share Posted October 1, 2009 Would anyone be able to write a quick tutorial on how to actually implement this code? Im not quite sure what to do with it. Cheers, Tom. Quote Link to comment Share on other sites More sharing options...
Guest Ryyaann Posted October 1, 2009 Report Share Posted October 1, 2009 Would anyone be able to write a quick tutorial on how to actually implement this code? Im not quite sure what to do with it. Cheers, Tom. Second that Tomo ! ;D Quote Link to comment Share on other sites More sharing options...
Tom Posted October 2, 2009 Report Share Posted October 2, 2009 Scrap that sorry. Ryan: Make a module folder "ForumRegister" Pase that code in as ForumRegister.php done. I'm having a problem though, the users are inactive and when I made them identical to other registered members they can't see any of the forums. Any ideas? Don't worry I fixed it myself. Quote Link to comment Share on other sites More sharing options...
Guest Ryyaann Posted October 4, 2009 Report Share Posted October 4, 2009 Well, the user went into the database with the right information but its not shown as the newest user and i can not login. Quote Link to comment Share on other sites More sharing options...
Tom Posted October 4, 2009 Report Share Posted October 4, 2009 Yeah the code provided only works for the person who posted it in the first place. You need to add quite a few more things and change things (e.g. group, unless you made a group 9) Quote Link to comment Share on other sites More sharing options...
Guest Ryyaann Posted October 4, 2009 Report Share Posted October 4, 2009 OK, found out the problem. They send over fine but they are placed in inactive users. Reason: Unknown Any help? Thanks in advance, Ryan Could anyone tell me how I could get it to change the username every time their airline changes? So if they are STP555 on the forums and they change airlines they would change to PTY555. Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted October 12, 2009 Author Administrators Report Share Posted October 12, 2009 It really needs to use the phpBB API to do it, not raw calls to the database. If someone can find out that info, I might be able to scratch something up real quick. Quote Link to comment Share on other sites More sharing options...
AJM101 Posted October 13, 2009 Report Share Posted October 13, 2009 Works Fine for me also, one reminder both databases need to be in the same one if you know what mean I guess thats why it doesnt work for me. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.