joomla网站上的严格标准错误消息

On the top of my joola website I get this error:

Strict Standards: Only variables should be assigned by reference in /home/mysite/public_html/templates/mysite/index.php on line 77

When I look up the index.php file that is referred to above and go to line 77 I see:

$user =& JFactory::getUser();

I think there is something wrong with that code, some how I need to change the:

JFactory::getUser()

to something like:

JFactory->getUser()

That is what I read by google the issue, but I cant figure out the correct code. Can some one advice?

Here is the compleate code section:

  $app    = JFactory::getApplication();
  $menu   = $app->getMenu();
  $active = $menu->getActive();
  $class  = $active->alias . " pageid-" . $active->id;
  $user =& JFactory::getUser();
  $userId = $user->get( 'id' );
  $username = $user->name;

Quick solution: Turn off error messages. Just go to "Global Configuration" in your backend, switch to the server tab and set the error reporting to none. Better solution: if you upgraded your php version, thats because of it. if not, find that extension using this php code and upgrade it. next solution: if you use joomla 1.5 or 2.5 its better to upgrade to newer version.