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


PHP Reminder::MarkCandidateAsAccepted方法代码示例

本文整理汇总了PHP中Reminder::MarkCandidateAsAccepted方法的典型用法代码示例。如果您正苦于以下问题:PHP Reminder::MarkCandidateAsAccepted方法的具体用法?PHP Reminder::MarkCandidateAsAccepted怎么用?PHP Reminder::MarkCandidateAsAccepted使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Reminder的用法示例。


在下文中一共展示了Reminder::MarkCandidateAsAccepted方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: IsCandidate

 public static function IsCandidate(User $user, $candidate)
 {
     $profile = $user->profile();
     if (!$profile) {
         return false;
     }
     // We only test if the user is in her promotion group for it is too
     // expensive to check if she is in the corresponding ML as well.
     $res = XDB::query('SELECT  COUNT(*)
                          FROM  group_members
                         WHERE  uid = {?} AND asso_id = (SELECT  id
                                                           FROM  groups
                                                          WHERE  diminutif = {?})', $user->id(), $user->profile()->yearPromo());
     $mlCount = $res->fetchOneCell();
     if ($mlCount) {
         Reminder::MarkCandidateAsAccepted($user->id(), $candidate);
     }
     if ($mlCount == 0) {
         $mlist = MailingList::promo($user->profile()->yearPromo());
         try {
             $mlist->getMembersLimit(0, 0);
         } catch (Exception $e) {
             return false;
         }
     }
     return false;
 }
开发者ID:Ekleog,项目名称:platal,代码行数:27,代码来源:promotion_ml.inc.php

示例2: IsCandidate

 public static function IsCandidate(User $user, $candidate)
 {
     $res = XDB::query("SELECT  COUNT(*) AS lists\n                             FROM  register_subs\n                            WHERE  uid = {?} AND type = 'list'", $user->id());
     $mlCount = $res->fetchOneCell();
     if (!$mlCount) {
         Reminder::MarkCandidateAsAccepted($user->id(), $candidate);
     }
     return $mlCount > 0;
 }
开发者ID:Ekleog,项目名称:platal,代码行数:9,代码来源:ml.inc.php

示例3: IsCandidate

 public static function IsCandidate(User $user, $candidate)
 {
     require_once 'newsletter.inc.php';
     $isSubscribed = NewsLetter::forGroup(NewsLetter::GROUP_AX)->subscriptionState();
     if ($isSubscribed) {
         Reminder::MarkCandidateAsAccepted($user->id(), $candidate);
     }
     return !$isSubscribed;
 }
开发者ID:Ekleog,项目名称:platal,代码行数:9,代码来源:ax_letter.inc.php

示例4: IsCandidate

 public static function IsCandidate(User $user, $candidate)
 {
     if (!$user->checkPerms(User::PERM_MAIL)) {
         return false;
     }
     require_once 'emails.inc.php';
     $active = Email::is_active_storage($user, 'imap');
     if ($active) {
         Reminder::MarkCandidateAsAccepted($user->id(), $candidate);
     }
     return !$active;
 }
开发者ID:Ekleog,项目名称:platal,代码行数:12,代码来源:email_backup.inc.php

示例5: IsCandidate

 public static function IsCandidate(User $user, $candidate)
 {
     if (!$user->checkPerms(User::PERM_MAIL)) {
         return false;
     }
     require_once 'googleapps.inc.php';
     $isSubscribed = GoogleAppsAccount::account_status($user->id());
     if ($isSubscribed == 'disabled') {
         $isSubscribed = false;
     }
     if ($isSubscribed) {
         Reminder::MarkCandidateAsAccepted($user->id(), $candidate);
     }
     return !$isSubscribed;
 }
开发者ID:Ekleog,项目名称:platal,代码行数:15,代码来源:gapps.inc.php


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