Welcome Guest, Not a member yet? Register   Sign In
A question regarding the Session Class
#3

[eluser]Crimp[/eluser]
You can put any information you want in the session (up to its limit). The above data is included in the session class by default.

To create a member area, with restricted access, you can for exmaple set session data called "logged_in" to TRUE.

Your session userdata array wil then be:

Code:
[array]
(
‘session_id’ => random hash,
‘ip_address’ => ‘string - user IP address’,
‘user_agent’ => ‘string - user agent data’,
‘last_activity’ => timestamp,
'logged_in' => TRUE
)

In your member area methods you can then check for:

Code:
if ($this->session->userdata('logged_in'))
{
// do if logged in
}


Messages In This Thread
A question regarding the Session Class - by El Forum - 06-20-2008, 08:22 PM
A question regarding the Session Class - by El Forum - 06-20-2008, 11:41 PM
A question regarding the Session Class - by El Forum - 06-21-2008, 03:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB