Users sometimes logout suddenly

zawin

Re: Users sometimes logout suddenly

Post by zawin »

- Remember Me - set to Yes
- "Remember Me" login key expiration length - set to 0
-i ntegration plugin url setting is https

This logout process is completely random, I could found any dependency with clicked URL on the webpage or something else.
User avatar
axew3
w3all User
w3all User
Posts: 2689
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Users sometimes logout suddenly

Post by axew3 »

"Remember Me" login key expiration length - set to 0
so change this setting: set it for a number of days, may 365
or as soon the session expire, then you'll be logged out.

Done this, may try to logout and re-login. You'll see that now your user will so not be logged out " suddenly".
zawin

Re: Users sometimes logout suddenly

Post by zawin »

Hello,
I put some logging inside file class.wp.w3all-phpbb.php and I found two main reasons for logout (with frequency about 10-times per day):

1) user-session problem

Code: Select all

  if ( empty( $phpbb_user_session ) OR $phpbb_user_session == 0 ){
   if ( is_user_logged_in() ) { 
  	 self::w3all_wp_logout();
  	} else { // no session, do not follow
  		return;
  	}
  }
2) $_COOKIE[$u]) < 2

Code: Select all

if ( intval($_COOKIE[$u]) < 2 && is_user_logged_in() ) {  self::w3all_wp_logout(); }
Do you have some idea why this happening?
User avatar
axew3
w3all User
w3all User
Posts: 2689
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Users sometimes logout suddenly

Post by axew3 »

Yes.
The phpBB cookie at some time is not found, because may expired in phpBB.
If an user navigate to phpBB and his cookie is removed, or is setup as not logged in user because ssion expired and there is no remember me cookie session, then the verify_credentials, when do not find out a valid cookie session matching correct user's login in phpBB, fire a logout in wordpress.
That's in theory correct, and is what's doing the code you mention.
Post Reply