Код: Выделить всё
public function actionShow()
{
$user=User::model()->findbyPk(Yii::app()->user->getId());
if(isset($user))
{
$criteria=new CDbCriteria;
$criteria->condition='t.txt_primary=1 and t.txt_uid='.$user->id;
$userContacts=UserContacts::model()->find($criteria);
}
$this->render('show',array(
'user'=>$user,
'userContacts'=>UserContacts::model(),//$userContacts,
'userDetails'=>UserDetails::model(),
'contactsPrimary'=>$contactsPrimary,
)
);
}
Код: Выделить всё
<?=CHtml::activeLabel($userContacts,'txt_street'); ?>
<?=CHtml::activeTextField($userContacts,'txt_street',array('class'=>'text')); ?>
Код: Выделить всё
Fatal error: Call to a member function getAttributeLabel() on a non-object in /public_html/framework/web/helpers/CHtml.php on line 1067