Testing 2.4.5 new coming release

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

Testing 2.4.5 new coming release

Post by axew3 »

Hello cool guys and really sorry for the delay! I'm alive, still free, and full of hopes ;)

I'm over to check all forum's questions, searching for patches to apply where required.
Started yesterday dedicating some time, and tested by the way the 2.4.4 code working fine into wp 58 without any problem (until now).

Please, remember me in reply if you like, anything you note that require to be may adjusted (and i probably will forget since options and configurations lead to numerous integrations scenarios). I will look into topics these days.

Any hint here will be really appreciated!

One i've found really strange:

i setup the option "add user in phpBB as deactivated when register in wordpress"
result: user active in phpBB.
REASON:
when WordPress create a new user, immediately after, the profile_update hook fire.
The reason why this happen is not clear to me, since it was intended that this hook should fire only when an user update his profile,
and not when it is created, or is it (mine) a wrong consideration?

An rc release will provided very asap in these days or 2.4.5 will be directly released if i will have the time to test it out about everything (or the most).

p.s I also appreciated any of yours support, that i felt along my bad time, in any way it had happen.
Really appreciated. And so helpful.
Thank you!

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

Re: Testing 2.4.5 new coming release

Post by axew3 »

One i've found really strange:
i setup the option "add user in phpBB as deactivated when register in wordpress"
result: user active in phpBB.
REASON:
when WordPress create a new user, immediately after, the profile_update hook fire.
The problem has been resolved, this way at moment:

Code: Select all

 public static function phpbb_update_profile($user_id, $old_user_data) {

// the profile_update hook seem to fire (also and may should not) just after an user is created.
// so return here if the $_GET['action'] == 'register' detected
// anyway, may some other external plugin will work with his own vars: so may add here 

 if ($user_id == 1 OR $_GET['action'] == 'register'){ return; }
The reason of the little code addition is clear. Return before subsequent code go to update the just created user into phpBB and activating him.
To get this compatible with any scenario/plugin and not the default wp, seem that will require a trick more.
I have an idea, but any suggestion would be welcome.

After this anyway there was another problem (reported and detected time ago, and never solved):
If i deactivate an user in wp, then it is deactivated also in phpBB.
But in wordpress, a deactivated user can reset his password, and when the reset happen, again, the code was going to update the user in phpBB with the new pass and activating.
This has been definitively fixed in short, patching the

Code: Select all

public static function phpbb_pass_update($user, $new_pass) {
and just checking on it if the user have (or not) roles in wp: if not, the user will not be reactivated in phpBB.

The same should be fixed for multisite part of the the code? going to check asap, i do not remember if this bug was affecting also the wp multisite.

Post Reply