Disable auto-register phpBB users in WP - is it possible?

zpintar
User w
User w
Posts: 10
Joined: Tue May 11, 2021 7:17 am

Disable auto-register phpBB users in WP - is it possible?

Post by zpintar »

We have about 150 users in WP and thousands of users in phpBB. So, we want all WP users have registration on phpBB (what this plugin works well), but NOT vice versa!

Our site is Multisite and we have disabled user registration in WP but when phpBB user without WP registration visit WP site he will always be auto registered on WP and we do not want that!

Is it possible to disable this?
User avatar
axew3
w3all User
w3all User
Posts: 2689
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Disable auto-register phpBB users in WP - is it possible?

Post by axew3 »

Hello, if i have well understand (that i'm not sure), have you so try to activate the
Activate integration without linking WordPress and phpBB users
option?
zpintar
User w
User w
Posts: 10
Joined: Tue May 11, 2021 7:17 am

Re: Disable auto-register phpBB users in WP - is it possible?

Post by zpintar »

No. I need linking but on some sort of "semi" way.

Explanation:
  1. When new member registered for the first time in Wordpress site and that member doesn't yet have phpBB account w3all create this user account on phpBB
  2. When new member registered for the first time in Wordpress site and that member has phpBB account w3all link (via same e-mail) this user account between WP and phpBB
  3. When new member registered for the first time in phpBB forum leave it alone only on phpBB site and DO NOT create his Wordpress account pair. Once, if this user will register on Wordpress than do like at point 2. - link them
User avatar
axew3
w3all User
w3all User
Posts: 2689
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Disable auto-register phpBB users in WP - is it possible?

Post by axew3 »

1) this is the normal way
2) since there is already another account with same email or username in phpBB, then with code as is, will refuse to create another into phpBB. Custom modification of this can be done, or into hooks that into wp_w3all.php calls the function

Code: Select all

create_phpBB_user(
that is defined into class.wp.w3all-phpbb.php, or for multisite, to create_phpBB_user_wpms(, or directly into these functions.
3) come together with point 2, and in addition, would be necessary to change the logic of the function verify_phpbb_credentials(
where wp_insert_user( call, and into each part, also into wp_w3all.php file, where the function wp_insert_user( fire.
That will not be so easy if you not completely understand the logic of the code (that's by the way quite easy in true).

Out of the contest:
https://www.axew3.com/w3/forums/viewtop ... 5194#p5194
this (improved and completed) will be required as mandatory from some (soon) future version, because will allow many possibilities and configurations of any kind.
zpintar
User w
User w
Posts: 10
Joined: Tue May 11, 2021 7:17 am

Re: Disable auto-register phpBB users in WP - is it possible?

Post by zpintar »

OK then.

1) and 2) are quite good for us (we just need this :) )

but, 3) is problematic not because this will create new user account in WP (OK, I do not want a ton of "dummy" user accounts because some phpBB user click on our WP for some reason and the plugin automatically create an user in WP) but the main problem arise if some of these phpBB users chose to be our member and have to fill up our registration form (with Ultimate Membership plugin btw). He can not to do that because he was already registered in WP via w3all plugin.
Maybe I can write code in some WP hook that will be control if some user was generated with phpBB role and immediately delete them from WP.
zpintar
User w
User w
Posts: 10
Joined: Tue May 11, 2021 7:17 am

Re: Disable auto-register phpBB users in WP - is it possible?

Post by zpintar »

Maybe I can write code in some WP hook that will be control if some user was generated with phpBB role and immediately delete them from WP
I tried and hook works, but this cause some other problems like unsuccessful autologin into WP because user was deleted just before system try to login them.

Uhh, obviously I'll have to do some dirty jobs to workaround this and current I do not have any idea. :)
Post Reply