Question

I am a newbie of the CI framework. I am trying to understand what session id is for. Here is the description from CI doc:

The user's unique Session ID (this is a statistically random string with very strong entropy, hashed with MD5 for portability, and regenerated (by default) every five minutes)

I am just wondering under what occasions I should use this.

Thanks

Was it helpful?

Solution

The session ID in CodeIgniter is essentially either;

if using a database for session storage: a random hash (string) that references the session data in the database so CodeIgniter knows what data belongs to who

if not using a database; an encrypted set of data that CodeIgniter uses (that you can leverage as well) to track the user (eg. if logged in, a user ID)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top