當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。