Hi. I can’t get object and its properties from my user model by id.
$user = UserInfo::model()->findByPk(Yii::app()->user->id);
$surname = $user->surname;
return $surname;
And im getting 0…
Hi. I can’t get object and its properties from my user model by id.
$user = UserInfo::model()->findByPk(Yii::app()->user->id);
$surname = $user->surname;
return $surname;
And im getting 0…
Check model name (UserInfo) and field name (surname) and also make sure of course someone is logged…