Hi, Dexcell !
First of all - great work with the lib
!
I’m new (but very excited) to the framework and I happened to need (and use) your lib in my first app with which I’m also learning CI.
So out of the nutshell I came across an issue when using your lib.
The problem:
- after calling the DX_Auth::logout() function the is_logged_in() one still returns true. and should you happen to load a view that renders itself logged-in conditionally it would display the “You have been logged out” message and still render itself as if the users is still logged in.
The reason:
- after calling session::sess_destroy() from the DX_Auth::logout() routine, the session::userdata(‘DX_logged_in’) call still returns true because the session::sess_destroy() method doesn’t invalidate the session user data.
So it’s really a framework bug (the session class doesn’t even allow you to delete user data) but I wanted first to double check this here before making a bud report and second - it will be much quicker for you to patch your lib than to wait for a framework patch to be issued.
Solution:
- add this at the end of the DX_Auth::logout() method:
$this->ci->session->set_userdata('DX_logged_in',FALSE);
Now the logout views will render correctly.
Regards