public function editprofile() { if (!Auth::LoggedIn()) { $this->set('message', 'You must be logged in to access this feature!'); $this->render('core_error.tpl'); return; } $this->set('userinfo', Auth::$userinfo); $this->set('customfields', PilotData::GetFieldData(Auth::$pilotid, true)); $this->set('bgimages', PilotData::GetBackgroundImages()); $this->set('countries', Countries::getAllCountries()); $this->set('pilotcode', PilotData::GetPilotCode(Auth::$userinfo->code, Auth::$userinfo->pilotid)); $this->render('profile_edit.tpl'); }