user_id?

6 years 9 months ago #190181 by jm1968a
I need to pull the current logged in user's ID so that I can use it in a query. My objective is to list items based on the user_id of the current user.

Is there an API call or something like that?

$user_id = $this->user_id;
6 years 9 months ago #190192 by jm1968a
found it!!!

$user =& JFactory::getUser();



<p><?php echo $user->id ?></p>
Moderators: beatnantkrileon
Time to create page: 0.359 seconds
Facebook Twitter Google LinkedIn