phpbb user always ending up on wp-profile page when added on WP

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

Re: phpbb user always ending up on wp-profile page when added on WP

Post by axew3 »

This is a trick to resolve the addition of the user when register in phpBB, and you want force the user added also in WP, when phpBB is surfed by direct url and not iframe. It is explained here:
viewtopic.php?f=2&t=643&p=2594#p2594
freakenstein
User w
User w
Posts: 7
Joined: Wed Mar 14, 2018 3:33 pm

Re: phpbb user always ending up on wp-profile page when added on WP

Post by freakenstein »

Love the fast thinkering.

It is correct, I'm indeed not using the iframe solution.

So, once a user has been copied/registered to WordPress, he would not land on the profile page again if he comes from PHPBB?
Since that is the case. On every new session (clean browser) once you log in on PHPBB and go to wordpress, you will end up on the profile page. (even here on axew3.com)
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: phpbb user always ending up on wp-profile page when added on WP

Post by axew3 »

no now in this case the result of my test here is that the user is ever redirected to home, not to profile. On localhost it is redirected as you say in profile.
If an user login in phpBB then go to specified WP url, so will be logged in WP side on fly, then the user, will be redirect to home or profile by the way, and not to the requested url.
So this still need to be fixed. I think the solution can be easy. Going to let know as soon i can.
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: phpbb user always ending up on wp-profile page when added on WP

Post by axew3 »

this has been also fixed i think:
where:

Code: Select all

  if (isset($ins_coming_phpbbU)){
CHANGE into:

Code: Select all

  if (isset($ins_coming_phpbbU) OR !strstr($_SERVER['REQUEST_URI'], 'wp-admin') OR !strstr($_SERVER['SCRIPT_NAME'], 'profile.php')){
it has been already updated also here in this example. Now seem to work all properly.
Going to commit the patch after some other test.
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: phpbb user always ending up on wp-profile page when added on WP

Post by axew3 »

The file class.wp.w3all-phpbb.php has just been patched and should resolve the correct redirect in any situation
https://plugins.trac.wordpress.org/brow ... tion/trunk
freakenstein
User w
User w
Posts: 7
Joined: Wed Mar 14, 2018 3:33 pm

Re: phpbb user always ending up on wp-profile page when added on WP

Post by freakenstein »

Wow, nice work!

I can confirm that it current is working in my staging environment.
Post Reply