summaryrefslogtreecommitdiffstats
path: root/system/libraries/Session/Session_driver.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries/Session/Session_driver.php')
-rw-r--r--system/libraries/Session/Session_driver.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/system/libraries/Session/Session_driver.php b/system/libraries/Session/Session_driver.php
index c46ca3a34..cc35b66d1 100644
--- a/system/libraries/Session/Session_driver.php
+++ b/system/libraries/Session/Session_driver.php
@@ -133,6 +133,12 @@ abstract class CI_Session_driver implements SessionHandlerInterface {
if ($this->_expiration)
{
ini_set('session.gc_maxlifetime', $this->_expiration);
+ ini_set('session.cookie_lifetime', $this->_expiration);
+ }
+ // BC workaround for setting cookie lifetime
+ elseif (config_item('sess_expire_on_close'))
+ {
+ ini_set('session.cookie_lifetime', 0);
}
// Security is king