mirror of
https://github.com/getgrav/grav.git
synced 2026-07-09 07:33:28 +02:00
Session expires in 30 mins independent from config settings (https://github.com/getgrav/grav-plugin-login/issues/178)
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
* Fix for `Page::translatedLanguages()` to use routes always [#2163](https://github.com/getgrav/grav/issues/2163)
|
||||
* Fixed `nicetime()` twig function
|
||||
* Allow twig tags `{% script %}`, `{% style %}` and `{% switch %}` to be placed outside of blocks
|
||||
* Session expires in 30 mins independent from config settings [login#178](https://github.com/getgrav/grav-plugin-login/issues/178)
|
||||
|
||||
# v1.5.1
|
||||
## 08/23/2018
|
||||
|
||||
@@ -14,6 +14,8 @@ namespace Grav\Framework\Session;
|
||||
*/
|
||||
class Session implements SessionInterface
|
||||
{
|
||||
protected $options;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
@@ -182,7 +184,10 @@ class Session implements SessionInterface
|
||||
unset($_COOKIE[session_name()]);
|
||||
}
|
||||
|
||||
$options = $readonly ? ['read_and_close' => '1'] : [];
|
||||
$options = $this->options;
|
||||
if ($readonly) {
|
||||
$options['read_and_close'] = '1';
|
||||
}
|
||||
|
||||
$success = @session_start($options);
|
||||
if (!$success) {
|
||||
@@ -335,6 +340,7 @@ class Session implements SessionInterface
|
||||
$value = (string)$value;
|
||||
}
|
||||
|
||||
$this->options[$key] = $value;
|
||||
ini_set($key, $value);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user