use cookie lifetime from settings

This commit is contained in:
steinm 2013-01-24 10:17:16 +00:00
parent c19d333ac6
commit 2b3321df7c

View File

@ -260,7 +260,11 @@ if(!$id = $session->create(array('userid'=>$userid, 'theme'=>$sesstheme, 'lang'=
}
// Set the session cookie.
setcookie("mydms_session", $id, 0, $settings->_httpRoot);
if($settings->_cookieLifetime)
$lifetime = time() + intval($settings->_cookieLifetime);
else
$lifetime = 0;
setcookie("mydms_session", $id, $lifetime, $settings->_httpRoot);
// TODO: by the PHP manual: The superglobals $_GET and $_REQUEST are already decoded.
// Using urldecode() on an element in $_GET or $_REQUEST could have unexpected and dangerous results.