phpbb users registered in wordpress at same time

lindalong
User w
User w
Posts: 7
Joined: Mon Sep 18, 2017 6:00 pm

phpbb users registered in wordpress at same time

Post by lindalong »

I seem to have some people in phpbb that are not listed in WP. I initially did the step where it "migrates" the accounts but now I seem to have additional ones. Can I do this step again to grab these people? Activate WordPress to phpBB and phpBB to WP users transfer I'm using an iframe to display phpbb in wp.
Everything is up to date. Thanks Linda

[TITLE EDITED AND several REPLIES on this topic REMOVED]

User avatar
axew3
w3all User
w3all User
Posts: 2232
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: phpbb users registered in wordpress at same time

Post by axew3 »

How to add an user that register in phpBB that you want added also in WordPress at mean time

in phpBB, OPEN file
includes/upc/ucp_register.php

search for this code:

Code: Select all

				if ($config['require_activation'] == USER_ACTIVATION_ADMIN)
				{
					/* @var $phpbb_notifications \phpbb\notification\manager */
					$phpbb_notifications = $phpbb_container->get('notification_manager');
					$phpbb_notifications->add_notifications('notification.type.admin_activate_user', array(
						'user_id'		=> $user_id,
						'user_actkey'	=> $user_row['user_actkey'],
						'user_regdate'	=> $user_row['user_regdate'],
					));
				}
immediately after add this code OR the next piece of code if you want user redirection in phpBB after wp user addition:
change http://192.168.1.5/wordpress to fit/point your wordpress URL (DO NOT ADD A FINAL SLASH)

not redirect the user in phpBB after addition in wp

Code: Select all

$wordpress_url = 'http://192.168.1.5/wordpress'; // SET HERE the WordPress URL you want to point to - DO NOT ADD FINAL SLASH (or change the code below)
    $rurl = stristr(htmlspecialchars_decode($url), '&sid=', true); // 'REMOVE this line' to pass entire URL (with also sid var included) // stristr as of PHP 5.3.0 or >  
     if( strpos($rurl, '/') == 0 ){ $rurl = trim(substr($rurl, 1)); }
     $rurl = base64_encode(generate_board_url() . '/'. str_replace('./', '', $rurl)); // this is, in case, for redirect into phpBB // w3insu=$utwpa&rurl=$rurl
     $utwpa = base64_encode($data['username']);
     header("Location: $wordpress_url/?w3insu=$utwpa"); 
     exit;
to redirect the user in phpBB after addition in wp, use/add this code instead:

Code: Select all

$wordpress_url = 'http://192.168.1.5/wordpress'; // SET HERE the WordPress URL you want to point to - DO NOT ADD FINAL SLASH (or change the code below)
    $rurl = stristr(htmlspecialchars_decode($url), '&sid=', true); // 'REMOVE this line' to pass entire URL (with also sid var included) // stristr as of PHP 5.3.0 or > 
     if( strpos($rurl, '/') == 0 ){ $rurl = trim(substr($rurl, 1)); }
     $rurl = base64_encode(generate_board_url() . '/'. str_replace('./', '', $rurl)); // this is, in case, for redirect into phpBB // w3insu=$utwpa&rurl=$rurl
     $utwpa = base64_encode($data['username']);
     header("Location: $wordpress_url/?w3insu=$utwpa&w3rtb=$rurl"); 
     exit;
When an user register in phpBB and completed correctly the registration procedure, will be then redirected and added into wordpress.
If you need that after addition in wordpress the user being redirected into phpBB (like the onlogin solution), then use the second suggested snippet right here above.

Post Reply