unexpected T_VARIABLE error caused by Joomla getUser method

HaraOxita

New Member
I'm getting the following error in a Joomla model file:\[quote\] unexpected T_VARIABLE, expecting T_FUNCTION in /var/www/html/clientFiles/components/com_arrcard/models/buynow.php on line 13\[/quote\]Here's the beginning of the file, up through line 14:\[code\]<?phpdefined( '_JEXEC' ) or die( 'Restricted access' ); jimport('joomla.application.component.model');class ArrcardModelBuynow extends JModel{ public $failedFields = array(); public $certificateNumber, $emailAddr, $voucherID, $voucherNbr, $userAcctID; //check if user is logged in $user =& JFactory::getUser(); $userAcctID = $user->id;\[/code\]Does anyone know why the getUser line is causing problems? I've used that code in a number of other places with no errors.
 
Back
Top