protected function setVariableValues() { $this->setVariable(self::AFF_NAME, trim($this->user->getFirstName()) . ' ' . trim($this->user->getLastName())); $this->setVariable(self::AFF_REFID, trim($this->user->getRefId())); $this->setVariable(self::AFF_EMAIL, trim($this->user->getEmail())); $this->setVariable(self::AFF_IP, Gpf_Http::getRemoteIp()); $this->setVariable(AutoResponsePlus_Config::NAME, $this->getSettingForSubject(AutoResponsePlus_Config::NAME)); $this->setVariable(AutoResponsePlus_Config::PASSWORD, $this->getSettingForSubject(AutoResponsePlus_Config::PASSWORD)); $this->setVariable(AutoResponsePlus_Config::AUTORESPONDER_ADDRESS, $this->getSettingForSubject(AutoResponsePlus_Config::AUTORESPONDER_ADDRESS)); $this->setVariable(AutoResponsePlus_Config::HTML, (Gpf_Settings::get(AutoResponsePlus_Config::HTML) == Gpf::YES ? 'html' : 'plain')); $this->setVariable(AutoResponsePlus_Config::TRACKING_TAB, $this->getSettingForSubject(AutoResponsePlus_Config::TRACKING_TAB)); $this->setVariable(AutoResponsePlus_Config::DROP_RULES, (Gpf_Settings::get(AutoResponsePlus_Config::DROP_RULES) == Gpf::YES ? 'yes' : 'no')); }
public function getUserFieldValue($code) { if($this->user == null) { throw new Gpf_Exception("You have to set User before getting user fields value!"); } if($code == 'refid') { return $this->user->getRefId(); } else if($code == 'firstname') { return $this->user->getFirstName(); } else if($code == 'lastname') { return $this->user->getLastName(); } else if($code == 'password') { return $this->user->getPassword(); } else if($code == 'username') { return $this->user->getUserName(); } else if($this->isCountryCode($code)){ return $this->getCountryName($this->user->get($code)); } try { return $this->user->get($code); } catch (Gpf_Exception $e) { } return ''; }
private function setFromEmailAndName(Pap_Mail_MassMailTemplate $template, $affiliateId) { $user = new Pap_Common_User(); $user->setAccountUserId($affiliateId); try { $user->loadFromData(array(Pap_Db_Table_Users::ACCOUNTUSERID)); } catch (Gpf_Exception $e) { Gpf_Log::debug('Unable to load sender information when sending broadcast mail from affiliateid: ' . $affiliateId . ', error: '. $e->getMessage()); return; } $email = $user->getUserName(); $name = $user->getFirstName() . ' ' . $user->getLastName(); $emailValidator = new Gpf_Rpc_Form_Validator_EmailValidator(); if ($emailValidator->validate($email)) { $template->setFromEmail($email); $template->setFromName($name); } }
private function signup(Pap_Common_User $user) { self::checkRequiredSettings(); $this->connect(); $campaignId = $this->resolveCampaignId(); $cycleDay = Gpf_Settings::get(GetResponseSignup_Config::CYCLE_DAY); if ($cycleDay != null && $cycleDay != '') { $result = $this->callFunction('add_contact', array ( 'campaign' => $campaignId, 'name' => $user->getFirstName() . ' ' . $user->getLastName(), 'email' => $user->getEmail(), 'cycle_day' => $cycleDay, 'customs' => $this->getCustomFields($user))); } else { $result = $this->callFunction('add_contact', array ( 'campaign' => $campaignId, 'name' => $user->getFirstName() . ' ' . $user->getLastName(), 'email' => $user->getEmail(), 'customs' => $this->getCustomFields($user))); } Gpf_Log::info('GetResponse - Affiliate added'); }
protected function setVariableValues() { $this->setVariable(self::AFF_NAME, $this->user->getFirstName()); $this->setVariable(self::AFF_EMAIL, $this->user->getEmail()); }