[eluser]olebulow[/eluser]
Hi Team CodeIgniter
I have a quick question that some of you brilliant guys probably quickly can help me with.
When a user logins i want to set some session data which i can use through the session time.
When the user logs in i want to set a session variable with the value from the db (table=departments_users - where users_id = dxauth_userid).
I have figured out that i have to play around in the library DX_Auth.php in libraries. But how do i do database queries in there?
Im thinking this is the code that needs to be used:
$data['userid'] = $this->dx_auth->get_user_id();
$this->db->select('departments_id,users_id');
$this->db->from('departments_users');
$this->db->where('users_id',$data['userid']);
return $this->db->get();
Or am i dead wrong here?
Hope someone can help..