diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-07-18 15:02:40 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-07-18 15:02:40 +0200 |
commit | aa6868d9b9664553066cce908211030693774273 (patch) | |
tree | 55381a364930d036b4b7e2cb81d7a5b68fb7acb7 | |
parent | 31380e88dd6af1d91ef1de0425b320706462e887 (diff) |
Backport fix for issue #1314
-rw-r--r-- | system/libraries/Session.php | 7 | ||||
-rw-r--r-- | user_guide/changelog.html | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/system/libraries/Session.php b/system/libraries/Session.php index 8ee08c5b2..891fdd36a 100644 --- a/system/libraries/Session.php +++ b/system/libraries/Session.php @@ -97,7 +97,7 @@ class CI_Session { { $this->sess_expiration = (60*60*24*365*2); } - + // Set the cookie name $this->sess_cookie_name = $this->cookie_prefix.$this->sess_cookie_name; @@ -399,7 +399,7 @@ class CI_Session { function sess_destroy() { // Kill the session DB row - if ($this->sess_use_database === TRUE AND isset($this->userdata['session_id'])) + if ($this->sess_use_database === TRUE && isset($this->userdata['session_id'])) { $this->CI->db->where('session_id', $this->userdata['session_id']); $this->CI->db->delete($this->sess_table_name); @@ -414,6 +414,9 @@ class CI_Session { $this->cookie_domain, 0 ); + + // Kill session data + $this->userdata = array(); } // -------------------------------------------------------------------- diff --git a/user_guide/changelog.html b/user_guide/changelog.html index c3a7e4c2a..bfca5a286 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -63,6 +63,7 @@ Change Log <h3>Bug fixes for 2.1.3:</h3> <ul> <li>Fixed a bug (#1543) - <a href="libraries/caching.html#file">File-based Caching</a> method <samp>get_metadata()</samp> used a non-existent array key to look for the TTL value.</li> + <li>Fixed a bug (#1314) - <a href="libraries/session.html">Session Library</a> method <samp>sess_destroy()</samp> didn't destroy the userdata array. </ul> <h2>Version 2.1.2</h2> |