private function initAffiliate($affiliateId) { $this->affiliate = new Pap_Affiliates_User(); $this->affiliate->setPrimaryKeyValue($affiliateId); $this->affiliate->load(); if ($this->affiliate->getType() != Pap_Application::ROLETYPE_AFFILIATE) { throw new Gpf_Exception($this->_('User is not affiliate')); } }