What is the right way to get all the data from the 'users' table in my database, using Tank Auth?
I tried it with just with $this->db->get('users');
But how do i get the data for the specific logged-in user?
Do I have to use $this->tank_auth->get_user_id();
?
Here's what I've tried:
function get_user_data()
{
$id = $this->tank_auth->get_user_id();
$this->db->where('id', $id);
$users = $this->db->get('users');
return $users->result();
}
I hope somebody can help me out with this.