Welcome Guest, Not a member yet? Register   Sign In
Session Expiration Changing
#1

Hi everybody! I'm trying to implement remember me functionallity.

I can't chage session expiration time manually in the controller.

If user didn't chech remember me checkbox, i'm trying to set:

if ($rememberMe != 1) {
        $this->session->sess_expiration = 0;
        $this->session->sess_expire_on_close = true;          
}

My config file is:

$config['sess_driver'] = 'files';
$config['sess_expire_on_close'] = false;
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = null;
$config['sess_match_ip'] = false;
$config['sess_time_to_update'] = 300;

I found this article http://stackoverflow.com/questions/14550...me-feature
but for me it doesn't work.
Reply
#2

Where are you doing that if ($rememberME) check? How are you loading sessions? That check needs to be done before sessions are loaded.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB