[eluser]dsentker[/eluser]
Hey there, i've got a page (method) for "Logout" - that means, the session have to be destroyed. There are two entrys in the session:
Code:
$newdata = array(
'user' => $this->acc['user'],
'pass' => $this->acc['pass']
);
$this->session->set_userdata($newdata);
Now, here's the Logout-Page:
Code:
function logout() {
$this->session->sess_destroy();
redirect('adm');
}
But the destroy process seems to fail:
Code:
function logout() {
echo 'before: '.$this->session->userdata('user');
$this->session->sess_destroy();
echo 'after: '.$this->session->userdata('user');
// redirect('adm');
}
And the output is:
Quote:before: john-doe
after: john-doe
I thought, session destroying means "kill every info in the session"?
If i do that:
Code:
function logout() {
$this->session->unset_userdata('user');
$this->session->unset_userdata('pass');
redirect('adm');
}
- it works. Whats wrong with sess_destroy?