Welcome Guest, Not a member yet? Register   Sign In
sess_destroy() returning NULL?
#1

[eluser]Maximilian Schoening[/eluser]
Hi,
is it normal that sess_destroy() returns NULL when destroying the session successfully? What does it return if the function didn't work?

Thanks,
Max
#2

[eluser]pistolPete[/eluser]
Just look at the code:

Code:
/**
     * Destroy the current session
     *
     * @access    public
     * @return    void
     */
    function sess_destroy()
    {
        // Kill the session DB row
        if ($this->sess_use_database === TRUE AND isset($this->userdata['session_id']))
        {
            $this->CI->db->where('session_id', $this->userdata['session_id']);
            $this->CI->db->delete($this->sess_table_name);
        }

        // Kill the cookie
        setcookie(
                    $this->sess_cookie_name,
                    addslashes(serialize(array())),
                    ($this->now - 31500000),
                    $this->cookie_path,
                    $this->cookie_domain,
                    0
                );
    }




Theme © iAndrew 2016 - Forum software by © MyBB