[eluser]digital_frog[/eluser]
[quote author="digital_frog" date="1341600553"]I'm trying to create a function that displays data that the currently logged in user has in a table separate from the ion_auth users. The table has three columns:[id (the primary key)], [uid (which matches the users id)], and [items (what the user currently has)]. The problem is that I can't seem to get at the current user's id.
How can I get the user's id from ion_auth?
I tried using
Code:
$user = $this->ion_auth->get_user();
from the start of this thread but this is throwing errors.
I've also tried using $user_id = $this->session->userdata( 'id' );
to try to get the data from the session, but that has only returned zero.
[/quote]
Funny how working for however long on a problem does so little, yet five minutes after asking the answer is discovered. Here is the solution: