[eluser]NZmuzzer[/eluser]
I have a very similar problem. Using v1.7 session class with database. When the user logs out the session record (database row) is removed and a new one created for the now logged out (guest) user. A flashdata messeage is then set, "You are now logged out", and the page redirected to the homepage.
Code:
function logout()
{
$this->wd_auth->logout();
$this->session->set_flashdata( 'notice', '<p>Welcome, you are now logged out</p>' );
redirect( 'homepage' );
}
and the wd_auth->logout() function in my auth library:
Code:
function logout()
{
$this->ci =& get_instance();
$config =& get_config();
// delete user record from session table
$this->ci->db->where( 'session_id', $this->ci->session->userdata( 'session_id' ) );
if( $query = $this->ci->db->delete( $config['sess_table_name'] ))
return FALSE;
// destroy the session
$this->CI->session->sess_destroy();
return TRUE;
}
However, the flashdata (which should be associated with the new session record) is not carried over to the next page. Where's it gone??