Roundcube Community Forum

News and Announcements => General Discussion => Topic started by: brooks on January 13, 2014, 06:57:45 AM

Title: unset session variables
Post by: brooks on January 13, 2014, 06:57:45 AM
I'm trying to unset session variables and cookies without using the logout task. All I see are these, but even after unsetting them, I'm still logged in. Can anyone help?

unset($_SESSION['sess_id']);
unset($_COOKIE['roundcube_sessid']);
unset($_COOKIE['roundcube_sessauth']);
Title: Re: unset session variables
Post by: SKaero on January 13, 2014, 07:28:28 AM
Your not removing the cookies correctly http://php.net/setcookie
Title: Re: unset session variables
Post by: brooks on January 13, 2014, 08:01:23 AM
I guess the easiest way is to delete it from table.
mysql_query("DELETE FROM `session` WHERE `sess_id` = '$cookie'");