Welcome Guest, Not a member yet? Register   Sign In
CI destroy session takes too long?
#1

[eluser]chaotiq[/eluser]
Sorry if this has been asked before.

I have controller with an index method that checks to see if the session exists. If it does then it goes to home.php . If not, then it sends the user to a login.php screen for credentials and then authenticates the user and sends them to the home.php screen. This part works.

Now I have a logout button on the home.php screen that calls the logout method in the same controller. The logout method is simple. It just destroys the session and calls the index function of the controller.
Code:
function logout()
    {
        $this->session->sess_destroy();
        
        $this->index();
    }//End of logout() function

The problem is that when I click the logout button it puts me right back to the home.php screen like the session was not destroyed. Once I click the logout button a second time I get taken back to the login.php screen like I wanted. Am loading the index method to 'quick'? so the session data is not destroyed on the first go around but is on the second?


Messages In This Thread
CI destroy session takes too long? - by El Forum - 01-24-2010, 09:25 PM
CI destroy session takes too long? - by El Forum - 01-24-2010, 09:56 PM
CI destroy session takes too long? - by El Forum - 01-24-2010, 10:13 PM
CI destroy session takes too long? - by El Forum - 01-25-2010, 06:45 AM
CI destroy session takes too long? - by El Forum - 01-25-2010, 06:51 AM
CI destroy session takes too long? - by El Forum - 01-25-2010, 07:52 AM
CI destroy session takes too long? - by El Forum - 01-25-2010, 10:01 AM
CI destroy session takes too long? - by El Forum - 01-25-2010, 10:08 AM
CI destroy session takes too long? - by El Forum - 01-25-2010, 10:17 AM
CI destroy session takes too long? - by El Forum - 01-25-2010, 10:39 AM
CI destroy session takes too long? - by El Forum - 01-25-2010, 06:38 PM



Theme © iAndrew 2016 - Forum software by © MyBB