コード例 #1
0
    private function createTestAffiliateUser() {
        $affiliateUser = new Pap_Affiliates_User();
        $affiliateUser->setId('11111111');
        $affiliateUser->setDateInserted(Gpf_Common_DateUtils::now());
        $affiliateUser->setRefId("testaff");
        $affiliateUser->setPassword($this->account->getPassword());
        $affiliateUser->setUserName(Pap_Branding::DEMO_AFFILIATE_USERNAME);
        $affiliateUser->setFirstName("Test");
        $affiliateUser->setLastName("Affiliate");
        $affiliateUser->setAccountId($this->account->getId());
        $affiliateUser->setStatus(Gpf_Db_User::APPROVED);
        $affiliateUser->set('dateapproved', Gpf_Common_DateUtils::Now());
        $affiliateUser->save();

        $this->setQuickLaunchSettings($affiliateUser->getAccountUserId(), 'showDesktop');
        Gpf_Settings::set(Pap_Settings::DEFAULT_AFFILIATE_PANEL_THEME, Pap_Branding::DEFAULT_AFFILIATE_PANEL_THEME);
    }