User->UserID; } else { $UserID = Gdn::Session()->UserID; } if(Gdn::Session()->UserID == $UserID) { $this->Title = 'My Badges'; } else { $this->Title = 'Badges'; } $BadgeModel = new BadgeModel(); $this->Data = $BadgeModel->GetUserBadgeAwards($UserID); } public function AssetTarget() { return 'Panel'; } public function ToString() { if($this->Data) { if($this->Visible) { $ViewPath = $this->FetchViewLocation('badges', 'yaga'); $String = ''; ob_start(); include ($ViewPath); $String = ob_get_contents(); @ob_end_clean(); return $String; } } return ''; } }