Forum constantly reloads when not logged in.

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

Re: Forum constantly reloads when not logged in.

Post 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

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

Re: Forum constantly reloads when not logged in.

Post 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

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

Re: Forum constantly reloads when not logged in.

Post 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

Post Reply