[eluser]arbme666[/eluser]
Thanks again for the quick reply.
One more question is there any way for the user to specify how long they want until the session cookie will expire?
A way of overriding the $config['sess_expiration'] so when the users login they can input say 30mins?
I have tried to destroy the session cookie and make a new one but with no luck. Maybe someone could point me to some links etc.
Code:
function _set_cookie($expire)
{
$CI =& get_instance();
$CI->load->helper('cookie');
$expire = (60 * $expire) + time();
$cookie_name = $CI->config->item('sess_cookie_name');
$cookie_data = get_cookie($cookie_name, TRUE);
delete_cookie($cookie_name);
setcookie(
$cookie_name,
$cookie_data,
time() - 31500000,
$CI->config->item('cookie_path'),
$CI->config->item('cookie_domain'),
0
);
setcookie(
$cookie_name,
$cookie_data, // session id
$expire,
$CI->config->item('cookie_path'),
$CI->config->item('cookie_domain'),
0
);
}
Thanks again!