I'm getting the following error in a Joomla model file:
unexpected T_VARIABLE, expecting T_FUNCTION in /var/www/html/clientFiles/components/com_arrcard/models/buynow.php on line 13
Here's the beginning of the file, up through line 14:
<?php
defined( '_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;
Does anyone know why the getUser line is causing problems? I've used that code in a number of other places with no errors.