From 3403366d0f457c1dd449076b4177d1aff5cb176c Mon Sep 17 00:00:00 2001
From: Greg Aker
Note: Cookies can only hold 4KB of data, so be careful not to exceed the capacity. The encryption process in particular produces a longer data string than the original so keep careful track of how much data you are storing.
+An array of all userdata can be retrieved as follows:
+$this->session->all_userdata()
+
+And returns an associative array like the following:
+ ++Array +( + [session_id] => 4a5a5dca22728fb0a84364eeb405b601 + [ip_address] => 127.0.0.1 + [user_agent] => Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; + [last_activity] => 1303142623 +) ++ +
Just as set_userdata() can be used to add information into a session, unset_userdata() can be used to remove it, by passing the session key. For example, if you wanted to remove 'some_name' from your session information:
$this->session->unset_userdata('some_name');