X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Freminder%2Fpromotion_ml.inc.php;h=c311e13ade6c63b53edf9ed5e6a7e9f22f9ac398;hb=b0b1718db4bbbfd3474f3fbc5c83e6a51862e266;hp=a49e4e78fda9e3adcd0c37d91d124948057ba97d;hpb=61acb758cbf8ee504ba4df67489f96e6b9b2ee18;p=platal.git diff --git a/include/reminder/promotion_ml.inc.php b/include/reminder/promotion_ml.inc.php index a49e4e7..c311e13 100644 --- a/include/reminder/promotion_ml.inc.php +++ b/include/reminder/promotion_ml.inc.php @@ -1,6 +1,6 @@ profile(); if (!$profile) { @@ -79,7 +79,16 @@ class ReminderPromotionMl extends Reminder if ($mlCount) { Reminder::MarkCandidateAsAccepted($user->id(), $candidate); } - return ($mlCount == 0); + if ($mlCount == 0) { + $mmlist = new MMList($user); + try { + $mmlist->get_members_limit('promo' + $user->profile()->yearPromo(), + 0, 0); + } catch (Exception $e) { + return false; + } + } + return false; } }