1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-21 05:02:02 +02:00

Issue #4520 Possible fix for session duration. (testing needed)

This commit is contained in:
Cameron 2021-06-18 09:44:26 -07:00
parent c4f76c3687
commit d8f9a96dea
2 changed files with 4 additions and 2 deletions

View File

@ -1505,7 +1505,7 @@ $text .= "
<tr>
<td><label for='session-lifetime'>".PRFLAN_272."</label>".$frm->help(PRFLAN_273)."</td>
<td>
".$frm->number('session_lifetime', varset($pref['session_lifetime']), 6)."
".$frm->number('session_lifetime', varset($pref['session_lifetime']), 86400)."
</td>
</tr>
";

View File

@ -216,7 +216,7 @@ class e_session
$config['SavePath'] = e107::getPref('session_save_path', false); // FIXME - new pref
$config['SaveMethod'] = e107::getPref('session_save_method', $saveMethod);
$options['lifetime'] = (integer)e107::getPref('session_lifetime', 86400);
$options['lifetime'] = (int) e107::getPref('session_lifetime', 86400);
$options['path'] = e107::getPref('session_cookie_path', ''); // FIXME - new pref
$options['secure'] = e107::getPref('ssl_enabled', false); //
@ -226,6 +226,8 @@ class e_session
{
ini_set('session.cookie_secure', 1);
}
ini_set('session.gc_maxlifetime', $options['lifetime']);
}
if (defined('SESSION_SAVE_PATH')) // safer than a pref.