Northern Flame Posted July 7, 2007 Share Posted July 7, 2007 Is their a way to have every user that registers to my website automatically register for my forums? and vise versa? For example, lets say someone registers to my website with the username: test123, is there a way so that the username and password for test123 can automatically be registered for my forums, and also if the username is taken in either my forums or my website, it will tell the user. Does anyone here know how to do this? Thanks for reading, and by the way if it will help anyone answer my question, I am using a phpBB forum Quote Link to comment Share on other sites More sharing options...
BillyBoB Posted July 7, 2007 Share Posted July 7, 2007 the only way i can think of doing that would be using the forum db and build around it Quote Link to comment Share on other sites More sharing options...
JP128 Posted July 7, 2007 Share Posted July 7, 2007 What forums do you use? phpBB? Quote Link to comment Share on other sites More sharing options...
BillyBoB Posted July 7, 2007 Share Posted July 7, 2007 thats what he said Quote Link to comment Share on other sites More sharing options...
JP128 Posted July 7, 2007 Share Posted July 7, 2007 oh lol.. kk, there is a way to do it, because I did... in your forums/includes/usercp_register.php go down to the line where it says: $sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey) VALUES ($user_id, '" . str_replace("\'", "''", $username) . "', " . time() . ", '" . str_replace("\'", "''", $new_password) . "', '" . str_replace("\'", "''", $email) . "', '" . str_replace("\'", "''", $icq) . "', '" . str_replace("\'", "''", $website) . "', '" . str_replace("\'", "''", $occupation) . "', '" . str_replace("\'", "''", $location) . "', '" . str_replace("\'", "''", $interests) . "', '" . str_replace("\'", "''", $signature) . "', '$signature_bbcode_uid', $avatar_sql, $viewemail, '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', '" . str_replace("\'", "''", $yim) . "', '" . str_replace("\'", "''", $msn) . "', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $popup_pm, $user_timezone, '" . str_replace("\'", "''", $user_dateformat) . "', '" . str_replace("\'", "''", $user_lang) . "', $user_style, 0, 1, "; it would be easier to say line 630. create a new $sql, and name it $sql1, on line 632. (Use notepad if you have to.) $sql1 = "INSERT INTO table_name VALUES ( '', //id '', //firstname (phpBB doesn't ask for it) '', //lastname (phpBB doesn't ask) '" . str_replace("\'", "''", $email) . "', '" . str_replace("\'", "''", $username) . "', '" . str_replace("\'", "''", $new_password) . "', //md5 encrypted password '" . str_replace("\'", "''", $location) . "', '" . str_replace("\'", "''", $occupation) . "', '" . str_replace("\'", "''", $website) . "', )"; You would obviously need to change the order of them to fit your table and then just mysql_query($sql1); right after the $sql1 Quote Link to comment Share on other sites More sharing options...
jhenary Posted July 7, 2007 Share Posted July 7, 2007 Or, instead of creating users in your own table, write them directly to phpbb_users. This is what I ended up doing. I have a small site with simple requirements so I just get basic info and fill in the other options with what I thought would be default. The users can always edit their profile after. You can also add fields to phpbb_users for extra info. Just be sure to know that adding fields may cause problems later upgrading versions, backup all info before you upgrade. Then use the phpbb login system and you're good to go. Quote Link to comment Share on other sites More sharing options...
Northern Flame Posted July 7, 2007 Author Share Posted July 7, 2007 THANKS FOR ALL THE REPLIES I REALLY APPRECIATE THAT! 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.