本文整理汇总了PHP中UserFactory::UnsubscribeEmail方法的典型用法代码示例。如果您正苦于以下问题:PHP UserFactory::UnsubscribeEmail方法的具体用法?PHP UserFactory::UnsubscribeEmail怎么用?PHP UserFactory::UnsubscribeEmail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserFactory
的用法示例。
在下文中一共展示了UserFactory::UnsubscribeEmail方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: UnsubscribeEmail
function UnsubscribeEmail($email)
{
if ($email != '' and $this->getPermissionObject()->Check('company', 'edit')) {
return UserFactory::UnsubscribeEmail($email);
}
return FALSE;
}
示例2: sendEmail
function sendEmail($to, $headers, $body)
{
global $config_vars;
if (!isset($config_vars['other']['primary_company_id'])) {
$config_vars['other']['primary_company_id'] = 1;
}
try {
$clf = TTnew('CompanyListFactory');
$clf->getById($config_vars['other']['primary_company_id']);
if ($clf->getRecordCount() > 0) {
foreach ($clf as $c_obj) {
$company_data = array('system_version' => APPLICATION_VERSION, 'registration_key' => $this->getLocalRegistrationKey(), 'product_edition_id' => $c_obj->getProductEdition(), 'product_edition_available' => getTTProductEdition(), 'name' => $c_obj->getName(), 'short_name' => $c_obj->getShortName(), 'work_phone' => $c_obj->getWorkPhone(), 'city' => $c_obj->getCity(), 'country' => $c_obj->getCountry(), 'province' => $c_obj->getProvince(), 'postal_code' => $c_obj->getPostalCode());
}
}
} catch (Exception $e) {
Debug::Text('ERROR: Cant get company data for sending email, database is likely down...', __FILE__, __LINE__, __METHOD__, 10);
$company_data = NULL;
}
if (isset($company_data) and $to != '' and $body != '') {
$retval = $this->getSoapObject()->sendEmail($to, $headers, $body, $company_data);
if ($retval === 'unsubscribe') {
UserFactory::UnsubscribeEmail($to);
$retval = FALSE;
}
return $retval;
}
return FALSE;
}