In my layouts/main.php: Fatal error: Call to a member function getAttribute() on a non-object in /Applications/XAMPP/xamppfiles/htdocs/cresearch/protected/views/layouts/main.php on line 38
When the user is logged in the Menu correctly displays first_name. When logged out there is an error b/c ‘first_name’ is not an object. Please advise.
<?php $this->widget('bootstrap.widgets.TbNavbar',array(
'class'=>'bootstrap.widgets.TbMenu',
'items'=>array(
array('label'=>Yii::app()->getModule('user')->t("Account").'('.Yii::app()->getModule('user')->user()->profile->
getAttribute('first_name').')', 'visible'=>!Yii::app()->user->isGuest, 'items'=>array(