Adding user to phpbb3 during registration from site
Hello Friends,
If you are looking for adding user into phpbb3 forum when any user register into your site, than i might help you as i faced the same situation. Today i faced this situation where my client needs the same user in phpbb forum(auto entry) whenever user register into website. This is an external script using which you can make entry into users table of phpbb3 forum. Also if you want to transfer all your site users into phpbb3 forum than also this will works.
define('IN_PHPBB', true);
global $db;
global $config;
global $user;
global $auth;
global $cache;
global $template;
global $phpbb_root_path;
global $phpEx;
$phpbb_root_path = 'forums/'; // forum directory path here
$phpEx = substr(strrchr(__FILE__, '.'), 1);
//include($phpbb_root_path . 'common.' . $phpEx);
include('forums/common.php');
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
require($phpbb_root_path .'includes/functions_user.php');
$username = $_POST['user'];
$password = $_POST['password']; // Dont encrypt the password!
$email = $_POST['email'];
// Check for unique username otherwise it will throw an error or might be blank page
$user_row = array(
'username' => $username,
'user_password' => md5($password), 'user_email' => $email,
'group_id' => 2, #Registered users group
'user_timezone' => '1.00',
'user_dst' => 0,
'user_lang' => 'en',
'user_type' => '0',
'user_actkey' => '',
'user_dateformat' => 'd M Y H:i',
'user_style' => 1,
'user_regdate' => time(),
);
$phpbb_user_id = user_add($user_row);
To know more about programming,JavaScript issues,jQuery,Expression Engine,MYSQL database and Open-source, enter your email address below. We will send you free tutorials.






I am
about 1 year ago
Hi, this is exactly what I've been looking for for ages! When a user subscribes to mailchimp I want to create a user account for them on my phpBB3.
Sorry this is so basic, but never used php before, so how do I apply the above code in practice? Fom action? hidden fields?
Massively appreciate any help given. Feel free to ask for more details, but not sure what you may need.
Rob
about 1 year ago
Hi, this is exactly what I've been looking for for ages! When a user subscribes to mailchimp I want to create a user account for them on my phpBB3.
Sorry this is so basic, but never used php before, so how do I apply the above code in practice? Fom action? hidden fields?
Massively appreciate any help given. Feel free to ask for more details, but not sure what you may need.
Rob
about 1 year ago
Rakshit, thank you very much for script! I need exactly the same in my site.
about 1 year ago
Rakshit, thank you very much for script! I need exactly the same in my site.
about 1 year ago
i want to sync wordpress users to phpbb. is it possible with this script?
about 1 year ago
i want to sync wordpress users to phpbb. is it possible with this script?
about 1 year ago
This was absolutely fantastic. I JUST started using phpbb and was trying to figure out how to do exactly this. Thank you so much!
about 1 year ago
This was absolutely fantastic. I JUST started using phpbb and was trying to figure out how to do exactly this. Thank you so much!
about 10 months ago
Hello
I am rookie here, welcome forum members .
about 9 months ago
I support secondhandy .. especially in that dressing sieciowkach is pretty boring, except that it is difficult to stand out by wearing clothes “popular” .. I look the same except lumpkow sometimes lesser-known stores
about 9 months ago
Hi,everybody,I am new.thanks for visiting assist me to towards the themes.I’ll thank you for you very much.
about 8 months ago
Such a nice post, really helpful for me, i was looking for my gaydating website which is based on webdate script. I am also looking for the login managment so that user dont have to login twice in the site( 1st for the site and 2nd for the forum)
please if someone can help me out please help me.
Thanks