I'm trying to use this code to do this:
Code: Select all
require('../libraries/joomla/factory.php');
$user =& JFactory::getUser();
$user_id = $user->id;
Fatal error: Call to undefined function jimport() in /home/(username)/public_html/libraries/joomla/factory.php on line 159
How do I make it so that I can grab the userid of the viewing user in my application? Please help!
Thank you