Welcome Guest, Not a member yet? Register   Sign In
Best Practice questions (headers, footers, sessions, oh my!)
#2

[eluser]dkrape[/eluser]
On 2 and 3, I'm using Tank Auth and it adds this sort of information to the session. In the view I can get this information by using: $this->session->userdata('user_id');

Tank Auth uses the following code to log the user_id and user_name into the session:

Code:
$this->ci->session->set_userdata(array(
  'user_id'    => $user->id,
  'username'    => $user->username,
  'status'    => ($user->activated == 1) ? STATUS_ACTIVATED : STATUS_NOT_ACTIVATED,
));


Messages In This Thread
Best Practice questions (headers, footers, sessions, oh my!) - by El Forum - 11-15-2010, 09:16 PM



Theme © iAndrew 2016 - Forum software by © MyBB