当前位置: 首页>>代码示例>>PHP>>正文


PHP UserFactory::UnsubscribeEmail方法代码示例

本文整理汇总了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;
 }
开发者ID:alachaum,项目名称:timetrex,代码行数:7,代码来源:APIUser.class.php

示例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;
 }
开发者ID:alachaum,项目名称:timetrex,代码行数:28,代码来源:TimeTrexSoapClient.class.php


注:本文中的UserFactory::UnsubscribeEmail方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。