diff options
Diffstat (limited to 'user_guide_src/source/libraries/sessions.rst')
-rw-r--r-- | user_guide_src/source/libraries/sessions.rst | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/user_guide_src/source/libraries/sessions.rst b/user_guide_src/source/libraries/sessions.rst index cab7669ae..b3de2252c 100644 --- a/user_guide_src/source/libraries/sessions.rst +++ b/user_guide_src/source/libraries/sessions.rst @@ -433,6 +433,7 @@ deleted data (sess_destroy), a regenerate handler to make a new session ID Your initial class might look like:: class CI_Session_custom extends CI_Session_driver { + protected function initialize() { // Read existing session data or create a new one @@ -457,6 +458,7 @@ Your initial class might look like:: { // Return a reference to your userdata array } + } Notice that ``get_userdata()`` returns a reference so the parent library is @@ -488,7 +490,6 @@ your config.php file to an array including your driver name:: $config['sess_valid_drivers'] = array('sess_driver'); - *************** Class Reference *************** @@ -647,4 +648,4 @@ Class Reference Returns a string containing the value of the passed item or NULL if the item is not found. Example:: $this->session->tempdata('message'); - //returns 'Test message.' considering the set_tempdata example. + //returns 'Test message.' considering the set_tempdata example.
\ No newline at end of file |