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);
    }
    public function setDefaultEmailNotificationsSettings(Pap_Affiliates_User $user) {
        Gpf_Db_Table_UserAttributes::setSetting("aff_notification_on_new_sale",
        Gpf_Settings::get(Pap_Settings::AFF_NOTIFICATION_ON_NEW_SALE_DEFAULT_SETTING_NAME),
        $user->getAccountUserId());

        Gpf_Db_Table_UserAttributes::setSetting("aff_notification_on_change_comm_status",
        Gpf_Settings::get(Pap_Settings::AFF_NOTIFICATION_ON_CHANGE_COMMISSION_STATUS_DEFAULT_SETTING_NAME),
        $user->getAccountUserId());

        Gpf_Db_Table_UserAttributes::setSetting("aff_notification_on_subaff_signup",
        Gpf_Settings::get(Pap_Settings::AFF_NOTIFICATION_ON_SUBAFF_SIGNUP_DEFAULT_SETTING_NAME),
        $user->getAccountUserId());

        Gpf_Db_Table_UserAttributes::setSetting("aff_notification_on_subaff_sale",
        Gpf_Settings::get(Pap_Settings::AFF_NOTIFICATION_ON_SUBAFF_SALE_DEFAULT_SETTING_NAME),
        $user->getAccountUserId());

        Gpf_Db_Table_UserAttributes::setSetting("aff_notification_on_direct_link_enabled",
        Gpf_Settings::get(Pap_Settings::AFF_NOTIFICATION_ON_DIRECT_LINK_DEFAULT),
        $user->getAccountUserId());

        Gpf_Db_Table_UserAttributes::setSetting("aff_notification_daily_report",
        Gpf_Settings::get(Pap_Settings::AFF_NOTIFICATION_DAILY_REPORT_DEFAULT),
        $user->getAccountUserId());

        Gpf_Db_Table_UserAttributes::setSetting("aff_notification_weekly_report",
        Gpf_Settings::get(Pap_Settings::AFF_NOTIFICATION_WEEKLY_REPORT_DEFAULT),
        $user->getAccountUserId());

        Gpf_Db_Table_UserAttributes::setSetting("aff_notification_monthly_report",
        Gpf_Settings::get(Pap_Settings::AFF_NOTIFICATION_MONTHLY_REPORT_DEFAULT),
        $user->getAccountUserId());
    }