• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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
                );
    }


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.