I was wondering, what would be the best way to make it so when a user registers with my site, it will register another (independent obviously) account with phpBB? I want users who sign up for my game to also be added with the same account information to phpBB for discussion.
I was thinking I could just add another mySQL query, but is there an easier way? Like that I can just pass all the $_POST variables to phpBB and it will do the work for me in the background?
Thanks
just add another SQL thing... it's not much a work...
But what I'm thinking about is... why don't let your game share the same user database as PHPbb?
| Mgccl wrote: |
just add another SQL thing... it's not much a work...
But what I'm thinking about is... why don't let your game share the same user database as PHPbb? |
It won't work.
Sharing the database would involve some PITA work and this is temporary. So just make a SQL query? Anything to know about registering users for phpBB? Like there are some fields I don't understand (like bbcodeuid or something).
sorry but I neeed to bump this
Can someone post some example mysql of registering a user? assuming I already get all the info in a registration page.
Also, i need to automatically add the user to a certain usrgroup. Thanks
You need a community builder to do this. I am using it right now, but just with Joomla(version 1.0.7) and SMF(version 1.1). I don't really know much about using phpBB, but is quite a pro in SMF
So, if you wants to try it, just pm me and I will be gladly to teach you.
I don't think I need any special script really, I'm not integrating the two, because this is for a game I am making. Eventually I'll have a custom forum so phpBB will be temporary. I just need to know the exact SQL to use to register users, (assuming I have all thier registration info)
the User password has to be in MD5 encryption I think...
| Code: |
INSERT INTO `phpbb_users` (`user_active` , `username` , `user_password`, `user_regdate` , `user_style` , `user_lang` , `user_dateformat`) VALUES ('1', '$username', '$userpass', '$regdate', '$styleno' , 'english', 'd M Y H:i');
|
Add any other fields you want... I take no responsibility if it doesnt work.
now as for adding the user to a group...
| Code: |
INSERT INTO `phpbb_user_groups` (`group_id`, `user_id`, `pending`) VALUES('$groupid', '$user_id', '0');
|
You will need to replace all the variable with the actual data, the group ID you can find by looking in phpbb_groups in your database.
Hope this works.
looks good, i'll try but what is $styleno?
| snowboardalliance wrote: |
| looks good, i'll try but what is $styleno? |
It's the style chosen by the users. If you are not sure which number to take, you can look at it in PHPMyAdmin.