[eluser]MarcL[/eluser]
I've been using the great DX Auth library to my user authentication and it's working really well. I'm using the auth controller as per the example code but I've either found a bug or I need a clarification of how sessions and flashdata work.
I've altered the auth controller to set some flashdata for 'You have logged in' and 'You have logged out' messages which are displayed by the main view. However, if I set the flashdata from the logout method of the auth controller it doesn't display.
Now the auth controller calls the DX Auth logout method which in turn calls:
Code:
$this->ci->session->sess_destroy()
and this causes the flashdata problem. Removing this line fixes the problem.
So my question is whether DX Auth should destroy the session at this point? I tried altering it so it just unsets all of the 'DX_...' data and this seems to work fine.
I might be misunderstanding how sessions work (as I'm a web app newbie!) but shouldn't the session remain as it might contain other data not related to DX auth?
Thanks,
Marc