Page 2 of 3

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

Posted: Thu Mar 15, 2018 5:20 pm
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

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

Posted: Thu Mar 15, 2018 5:43 pm
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)

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

Posted: Thu Mar 15, 2018 7:13 pm
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.

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

Posted: Thu Mar 15, 2018 7:39 pm
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.

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

Posted: Thu Mar 15, 2018 7:46 pm
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

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

Posted: Thu Mar 15, 2018 9:15 pm
by freakenstein
Wow, nice work!

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