- speed up the whole session cleaning in kill_session()
| | |
| | | */ |
| | | public function kill_session() |
| | | { |
| | | foreach (array_keys($_SESSION) as $var) |
| | | rcube_sess_unset($var); |
| | | rcube_sess_unset(); |
| | | $_SESSION = array('language' => $this->user->language, 'auth_time' => time(), 'temp' => true); |
| | | rcmail::setcookie('sessauth', '-del-', time() - 60); |
| | | $this->user->reset(); |
| | |
| | | |
| | | |
| | | // unset session variable |
| | | function rcube_sess_unset($var) |
| | | function rcube_sess_unset($var=NULL) |
| | | { |
| | | $DB = rcmail::get_instance()->get_dbh(); |
| | | |
| | | if (empty($var)) |
| | | return rcube_sess_destroy(session_id()); |
| | | |
| | | $now = $DB->fromunixtime(time()); |
| | | |
| | | $sql_result = $DB->query( |