0

Recently upgraded to EE 2.8.1 and was worried about some things discussed in this thread.

Prior to EE 2.8 we were able to use the user_session_ttl config to set the user's session to whatever duration we pleased. But that config no longer exists, instead the user's session is now hardcoded to 2 hours (different if remember me is checked) (and cp sessions are 1 hour by default).

Are there any options out there asides from editing core for managing session lengths?

Or perhaps I am missing something?

1 Answer 1

0

I wound up reverting the method _setup_session_length in Session.php to what it was before EE 2.8 so I can keep using the config variables -- though I still get the new javascript prompt on the CP end.

For convenience sake I'll leave the code here (if this is a problem, please by all means edit/let me know). The *_session_ttl config variables are in seconds, you would throw those in your config.php or bootstrap e.g. as $config['user_session_ttl'] = 9001;.

protected function _setup_session_length()
{
    $u_item = ee()->config->item('user_session_ttl');
    $cp_item = ee()->config->item('cp_session_ttl');

    $this->cpan_session_len = ($cp_item !== FALSE) ? $cp_item : $this->cpan_session_len;
    $this->user_session_len = ($u_item !== FALSE) ? $u_item : $this->user_session_len;

    return (REQ == 'CP') ? $this->cpan_session_len : $this->user_session_len;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.