Users sometimes logout suddenly

Post a reply


This question is a means of preventing automated form submissions by spambots.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

If you wish to attach one or more files enter the details below.

Maximum filesize per attachment: 1 MiB.

Expand view Topic review: Users sometimes logout suddenly

Re: Users sometimes logout suddenly

by axew3 » Tue Feb 09, 2021 2:10 pm

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.

Re: Users sometimes logout suddenly

by zawin » Tue Feb 09, 2021 7:43 am

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?

Re: Users sometimes logout suddenly

by axew3 » Tue Feb 02, 2021 10:58 am

"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".

Re: Users sometimes logout suddenly

by zawin » Tue Feb 02, 2021 8:27 am

- 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.

Re: Users sometimes logout suddenly

by axew3 » Tue Feb 02, 2021 8:10 am

so what's the setup of the remember me option in phpBB ACP?

under Security settings

Allow "Remember Me" logins: (set to Yes)

"Remember Me" login key expiration length (in days): (set as, maybe 365)

Are you sure that your server rewrite all requests to be https and the problem isn't really the fact that someone fall into http, after he logged as https, then have an https cookie that is not recognized under http, may due to some link you go to click, and which point to an http url?

p.s have you setup the integration plugin url setting to be https?

it is assumed yes, just resuming possible causes

Re: Users sometimes logout suddenly

by zawin » Tue Feb 02, 2021 8:01 am

My webpage svetelektro.com is completely under https - forum and wordpress and secure cookie is enabled.

Top