Welcome Guest, Not a member yet? Register   Sign In
docs 1.7.0 (Sessions Library)
#1

[eluser]a&w[/eluser]
Forgive me if I should not be posting bugs about docs for a version still in svn. I noticed the docs were partially updated, so I thought the bit I'm reporting below may have been overlooked.

user_guide/libraries/sessions.html
Code:
The above data is stored in a cookie as a serialized array with this prototype:
[array]
(
     'session_id'    => random hash,
     'ip_address'    => 'string - user IP address',
     'user_agent'    => 'string - user agent data',
     'last_activity' => timestamp
)

I think the above needs a line for 'user_data'.

Code:
CREATE TABLE IF NOT EXISTS  `ci_sessions` (
   session_id varchar(40) DEFAULT '0' NOT NULL,
   ip_address varchar(16) DEFAULT '0' NOT NULL,
   user_agent varchar(50) NOT NULL,
   last_activity int(10) unsigned DEFAULT 0 NOT NULL,
   user_data text NOT NULL,
   PRIMARY KEY (session_id)
);

I noted the change log has:
Quote:Updated the Sessions class so that any custom data being saved gets stored to a database rather than the session cookie (assuming you are using a database to store session data), permitting much more data to be saved.

I see where instructions for this are in the upgrade instructions. Maybe you don't typically document changes, but perhaps some stronger wording is needed here?

Code:
The above data is stored in a cookie as a serialized array with this prototype:
[array]
(
     'session_id'    => random hash,
     'ip_address'    => 'string - user IP address',
     'user_agent'    => 'string - user agent data',
     'last_activity' => timestamp,
     'user_data'     => 'string - custom user data'  ***Added CI 1.7***
)
#2

[eluser]phpwebdev[/eluser]
Yes this wiill better

Regards
#3

[eluser]a&w[/eluser]
I think some of the above made it into the user guide. Unfortunately if I specify NOT NULL I'm getting errors. I think maybe it needs to be NULL as of latest CI version. I could have swore I verified that the above worked before posting it, did something change in the sessions class since I posted this? Maybe I'll scan the svn logs.
#4

[eluser]a&w[/eluser]
I see Rick made several changes Sept 12, a few days after my post. Not sure though if those changes are the cause or not, they appear to be tampering with user_data. Anyway, I think the docs need a touchup.




Theme © iAndrew 2016 - Forum software by © MyBB