getting user_id in Joomla 1.6

A multipurpose module, plugin and component

getting user_id in Joomla 1.6

New postby [email protected] » Fri Jan 28, 2011 8:35 pm

I used to be able to use this:
Code: Select all
<?php
$user = JFactory::getUser();
echo $user->id;
?>


that does not work anymore though.

What's new code for 1.6?
[email protected]
 
Posts: 10
Joined: Fri Jan 28, 2011 8:31 pm

Re: getting user_id in Joomla 1.6

New postby [email protected] » Fri Jan 28, 2011 9:32 pm

got it here:
Code: Select all
<?php

$uid    = $user->get('id');
echo $uid;

?>
[email protected]
 
Posts: 10
Joined: Fri Jan 28, 2011 8:31 pm


Return to Jumi

Who is online

Users browsing this forum: No registered users and 4 guests

cron