The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
User Sessions, expire time
#14
Maybe something else is different? I'm not sure where the double redirect or redirect after headers sent would come from.

if (isset($_SESSION['LAST_ACTIVITY']) && ((time()-$_SESSION['LAST_ACTIVITY']) > $site_settings->session_timeout) && $user->isLoggedIn()) {
session_unset(); // unset $_SESSION variable for the run-time
session_destroy(); // destroy session data in storage

Redirect::to($us_url_root);
}
$_SESSION['LAST_ACTIVITY'] = time(); // update last activity time stamp

Destroying the session of a non logged in user doesn't make sense, and that is the only additional check being done ($user->isLoggedIn(). The Redirect to $us_url_root simply reloads the page, and in effect generates a new "logged out session".
  Reply


Messages In This Thread
User Sessions, expire time - by aseiras - 09-12-2016, 02:26 PM
User Sessions, expire time - by mudmin - 09-12-2016, 02:39 PM
User Sessions, expire time - by aseiras - 09-12-2016, 02:45 PM
User Sessions, expire time - by mudmin - 09-12-2016, 02:56 PM
User Sessions, expire time - by mudmin - 09-12-2016, 02:57 PM
User Sessions, expire time - by aseiras - 09-12-2016, 04:12 PM
User Sessions, expire time - by mudmin - 09-12-2016, 09:52 PM
User Sessions, expire time - by brian - 09-12-2016, 10:12 PM
User Sessions, expire time - by brian - 09-13-2016, 12:45 PM
User Sessions, expire time - by brian - 09-13-2016, 01:10 PM
User Sessions, expire time - by aseiras - 09-13-2016, 01:26 PM
User Sessions, expire time - by aseiras - 09-13-2016, 01:29 PM
User Sessions, expire time - by aseiras - 09-14-2016, 10:29 AM
User Sessions, expire time - by brian - 09-14-2016, 11:19 AM
User Sessions, expire time - by aseiras - 09-14-2016, 11:33 AM
User Sessions, expire time - by brian - 09-14-2016, 12:06 PM
User Sessions, expire time - by aseiras - 09-14-2016, 12:18 PM
User Sessions, expire time - by brian - 09-14-2016, 12:27 PM
User Sessions, expire time - by aseiras - 09-14-2016, 12:34 PM
User Sessions, expire time - by brian - 09-14-2016, 12:54 PM
User Sessions, expire time - by mudmin - 09-15-2016, 02:34 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)