2.5.2 released, and coming 2.5.3 logs

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

Re: 2.5.2 released, and coming 2.5.3 logs

Post by axew3 »

About user group option.
In phpBB, it is possible set as default a group for an user (beside the fact that the user can belong so to many other groups).
In WordPress we have default roles (beside the fact that external plugins can add roles as more they like and in any taste).

What the option will do will be as follow if active:
when an user will be updated to a group default for member known as a default phpBB group so like and recognized into user session as:
REGISTERED
REGISTERED COPPA
GLOBAL MODERATORS
ADMINISTRATORS
BOTS
NEWLY REGISTERED
or
Moderators

the user will switched to the corresponding Role in WP.
The same goes for the contrary:
if a role found, group in phpBB for the user will be also updated to the corresponding

ex: moderators in phpBB -> editors in WP

The simply code, will aim to be not only an option, but an easy start point that can be edited to match any plugin or extension with easy, just adding few things (may added as separated file that can be included and where a simple array can be provided to add roles or groups and where to switch to a group or a role)
The same option will be provided in phpBB via the phpBB WordPress extension
User avatar
axew3
w3all User
w3all User
Posts: 2712
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: 2.5.2 released, and coming 2.5.3 logs

Post by axew3 »

About above mention on disabling the email check into phpBB when email updated in WP profile
this is it on code (to know the logic of the whole think) as on wp_w3all.php
If disabled the option above will remove also the hook (both into wp-admin and front-end):

Code: Select all

 add_action( 'user_profile_update_errors', 'w3all_user_profile_update_errors', 10, 1 );
because there is no need to keep it active, if all users have been paired and then, and/or it is used the phpBB extension into phpBB, and/or it is allowed to register only into one side and/or ... etc

So that will be possible to adjust any incompatibility with any possible external plugin.
User avatar
axew3
w3all User
w3all User
Posts: 2712
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: 2.5.2 released, and coming 2.5.3 logs

Post by axew3 »

axew3 wrote: Thu Jan 27, 2022 8:30 am About above mention on disabling the email check into phpBB when email updated in WP profile
this is it on code (to know the logic of the whole think) as on wp_w3all.php
If disabled the option above will remove also the hook (both into wp-admin and front-end):

Code: Select all

 add_action( 'user_profile_update_errors', 'w3all_user_profile_update_errors', 10, 1 );
because there is no need to keep it active, if all users have been paired and then, and/or it is used the phpBB extension into phpBB, and/or it is allowed to register only into one side and/or ... etc

So that will be possible to adjust any incompatibility with any possible external plugin.
instead there is a problem disabling into WP-admin also:
what about if an admin go to delete an user in WP, that is then not deleted in phpBB, but only deactivated?
The best would be that when an user deleted in WP, it should be deleted also in phpBB and not only deactivated.
User avatar
axew3
w3all User
w3all User
Posts: 2712
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: 2.5.2 released, and coming 2.5.3 logs

Post by axew3 »

It is coming 2.5.3.
It mainly is released to resolve this:
* Fix: 'Error: the provided email is associated with another account into our forum' coming out when user register in phpBB and then should be added into WordPress due to a valid phpBB session or explicit login into WP
* Fix: all others cases, where an user registered in phpBB and then should be added in WP, included user addition in WP using the phpBB integration extension option (that if used do not need to be updated, the bug was affecting the plugin code not the extension)
There is an unique case, where the user addition will not work that i tested: into default memberpress account page when an user should be added in WP onlogin. It do not let run wp_authenticate nor anything else.
If an user that need to be added into wordpress due to an explicit login in WP, because registered in phpBB but not logged, nor phpBB WP integration "add users at same time in WP" enabled, nor the user present a valid session cookie, the user will not be added into WordPress. All will work into default WordPress, and i assume into majority of all plugins. But for example not in memberpress.
Normally sites that are using memberspress, may leave users only register into wordpress, so that maybe this is not a problem.
In any case, you can see that into wp_w3all.php has been added this to resolve the problem in case (not added by the way):

Code: Select all

  // OR isset($_POST['log']) && isset($_POST['pwd']) should be added to let add in WP, users that login via (example) memberpress front-page account: 
  // when no other hook run, it is possible to let it fire the user addition in WP onlogin, changing into this the line below
  // note that adding more vars than $_POST['log'] and $_POST['pwd'] for some other plugin and make it work all, it is necessary to add related vars on top into w3all_login_widget() function
//if( isset($_POST['w3all_username']) && isset($_POST['w3all_password']) OR isset($_POST['log']) && isset($_POST['pwd']) ){
so that when an user come to login in WP side and should be added in WP because still not existent (registered in phpBB) will be correctly added in WP, also using the memberpress front-end account page.

The groups switch option above mentioned, has been moved to next release.

2.5.3 has been released


[EDITED]
Locked