Page 2 of 3

Re: Forum constantly reloads when not logged in.

Posted: Fri May 15, 2020 2:42 pm
by axew3
mhh ... i see a strange thing into your page forum, that let me think php versions can may interfere, so a fix should be applied maybe-
Your wp, i see that even if my user is not logged in, the function wp_get_current_user(); return 1.
This cause the loop, because the user is not really logged instead into phpBB, nor in wp. Then the iframe loop.
let me check the solution

Re: Forum constantly reloads when not logged in.

Posted: Fri May 15, 2020 2:49 pm
by axew3
open page-forum.php and where this line:

Code: Select all

var wp_u_logged = ".$current_user->ID.";
change with this:

Code: Select all

var wp_u_logged = ".get_current_user_id().";
it is better to change this line by default because it return a strange result i see (and fortunately it is was not affecting any security issue. Imagine a result that should be 0 that return 1 instead) WoW
Please let know asap

Re: Forum constantly reloads when not logged in.

Posted: Sat May 16, 2020 4:25 pm
by axew3
default addons/page-forum.php file on plugin repository has been patched to resolve definitively this issue, as said above, it substitute this line of code:

Code: Select all

var wp_u_logged = ".$current_user->ID.";
with this:

Code: Select all

var wp_u_logged = ".get_current_user_id().";
i assume the wrong result may was given by the previous code, on different Php versions. It do not return the same into my tests