Open lloyd966 opened 11 years ago
I get the following error when I click on My profile in the admin screen
Trying to get property of non-object
C:\wamp\www\testdrive\protected\modules\profile\models\YumProfile.php(66)
54 // All fields that the user has activated in his privacy settings will 55 // be obtained and returned for the use in the profile view 56 public function getPublicFields() { 57 if(!Yum::module('profile')->enablePrivacySetting) 58 return false; 59 60 $fields = array(); 61 62 if($privacy = YumUser::model() 63 ->cache(500) 64 ->with('privacy') 65 ->findByPk($this->user_id) 66 ->privacy->public_profile_fields) { 67 $i = 1; 68 foreach(YumProfileField::model()->cache(3600)->findAll() as $field) { 69 if( 70 (($i & $privacy) 71 && $field->visible != YumProfileField::VISIBLE_HIDDEN) 72 || $field->visible == YumProfileField::VISIBLE_PUBLIC) 73 $fields[] = $field; 74 $i*=2; 75 } 76 } 77 return $fields; 78 }
I get the following error when I click on My profile in the admin screen
Trying to get property of non-object
C:\wamp\www\testdrive\protected\modules\profile\models\YumProfile.php(66)
54 // All fields that the user has activated in his privacy settings will 55 // be obtained and returned for the use in the profile view 56 public function getPublicFields() { 57 if(!Yum::module('profile')->enablePrivacySetting) 58 return false; 59 60 $fields = array(); 61 62 if($privacy = YumUser::model() 63 ->cache(500) 64 ->with('privacy') 65 ->findByPk($this->user_id) 66 ->privacy->public_profile_fields) { 67 $i = 1; 68 foreach(YumProfileField::model()->cache(3600)->findAll() as $field) { 69 if( 70 (($i & $privacy) 71 && $field->visible != YumProfileField::VISIBLE_HIDDEN) 72 || $field->visible == YumProfileField::VISIBLE_PUBLIC) 73 $fields[] = $field; 74 $i*=2; 75 } 76 } 77 return $fields; 78 }