How to avoid the wp userid 1 and phpbb userid 2 association?

urghesgrunt
Posts: 3
Joined: Fri Jul 27, 2018 3:00 pm

How to avoid the wp userid 1 and phpbb userid 2 association?

Post by urghesgrunt »

in an old phpbb forum i have userid 1 that is no longer an administrator, but a normal user... now if i install a new wordpress blog and my wp user id 1 and my phpbb user id 2 are connected by default... there is a method to avoid this?

This post/procedure is obsolete as WordPress phpBB plugin version 1.9.2 just released on date 5 Sept 2018.
wp userid 1 and phpbb userid 2 association is now option on plugin admin page.
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: how to avoid the wp userid 1 and phpbb userid 2 association?

Post by axew3 »

why you not setup the user with id 1 in wordpress, to be (for example) subscriber then?
Or read the following answers for the how to ...
[EDITED]
urghesgrunt
Posts: 3
Joined: Fri Jul 27, 2018 3:00 pm

Re: how to avoid the wp userid 1 and phpbb userid 2 association?

Post by urghesgrunt »

so the solution is to create the wordpress site with the WP-userid 1, with the official site email, then create another WP-administrator (WP-user id 2) with same username and email of a PHPBB-administrator, then log in wp as WP-user id 2, correct (maybe via database?) WP-user-id 1 username and email to be the same as PHPBB-user-id 2 and make it "subscriber"... this is the suggested method, right?
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: how to avoid the wp userid 1 and phpbb userid 2 association?

Post by axew3 »

(maybe via database?)
No this is really not required.

Follow to next posts for the solution answer

Just setup the user ID1 (install admin of wordpress) as subscriber with another admin.
Before to install/activate the plugin, check well that the same installing user, exist with same email and same username into phpBB also.
Remember also that if there are old existent WP users, you need to transfer these users in phpBB when integration start.

NOTE: it's not necessary to install the plugin as admin ID1 of wordpress: this user could also not exist. The only needed requirement, is that the user that is installing the plugin, exist in phpBB also, with same username and email (possible with same pass or you'll use phpBB password to login this user after the plugin activation).
If UID1 of Wordpress, the default install admin, not exist, it is not a problem.

If the UID1 in wordpress not exist and in phpBB the uid 2 isn't an admin, it will be added in wordpress following all other users rules: if registered as subscriber, if moderator as editor, if admin as admin: if not recognized, subscriber by default.

Hope all is clear now, if not here we are.

[FOLLOW TO THE NEXT X COMPLETE ANSWER]
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: how to avoid the wp userid 1 and phpbb userid 2 association?

Post by axew3 »

The answer on HOW TO avoid WP ID1 and phpBB ID2 to be linked is:

open class.wp.w3all-phpbb.php file
and inside the
private static function w3all_get_phpbb_config(){
(or) search for this code:

Code: Select all

     if( empty($res) OR ! $res ){
      	return;
      }
immediately after add this:

Code: Select all

$u = $res["cookie_name"].'_u';
if ( $current_user->ID == 1 OR isset($_COOKIE[$u]) && $_COOKIE[$u] == 2 ) {
 define('WPW3ALL_NOT_ULINKED', true);
}
That is. The user ID1 in WP and ID2 in phpBB are now excluded to be linked.
urghesgrunt
Posts: 3
Joined: Fri Jul 27, 2018 3:00 pm

Re: how to avoid the wp userid 1 and phpbb userid 2 association?

Post by urghesgrunt »

thanks a lot
Locked