Page 1 of 2
Disable auto-register phpBB users in WP - is it possible?
Posted: Thu May 13, 2021 6:44 am
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?
Re: Disable auto-register phpBB users in WP - is it possible?
Posted: Thu May 13, 2021 6:52 am
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?
Re: Disable auto-register phpBB users in WP - is it possible?
Posted: Thu May 13, 2021 8:01 am
by zpintar
No. I need linking but on some sort of "semi" way.
Explanation:
- 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
- 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
- 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
Re: Disable auto-register phpBB users in WP - is it possible?
Posted: Thu May 13, 2021 1:14 pm
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
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.
Re: Disable auto-register phpBB users in WP - is it possible?
Posted: Thu May 13, 2021 3:25 pm
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.
Re: Disable auto-register phpBB users in WP - is it possible?
Posted: Thu May 13, 2021 4:51 pm
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.