I inherited a project on CI. The session mechanism is implemented through the Native_session library. There was a task: to kill the session after a certain time of inactivity of the user. I rummaged through the lib itself, a change in the parameter which, judging by the author’s comments, is responsible for the session’s lifetime. I added my functionality through additional variables in $ _SESSION, but something I don’t like about it, are there any built-in methods for implementing this task?
2 answers
config/config.php $config['sess_expiration']
- As far as I understood, the native_session library interrupts the standard session mechanism, but I tried your option, it did not give a result. - Mr_OST
- The library should have its own configuration then. Take a look. This is not self-made? - forum3
- No, not self-made. I wrote in the question itself that a parameter change in lib did not produce a result, only input of an additional parameter and verification of it (already self-made) helped. I just do not like the result, and I would like to hear options from those who solved a similar problem. - Mr_OST
|
As this resource says, the lifetime of the session is here:
class Native_session { var $session_id_ttl = 360; // session id time to live (TTL) in seconds ....
So it is necessary either to change this parameter, or when creating an object to pull it from the config or from where else
|