* only send the one invitation reminder per email address, regardless of how many invitations there are

* don't send invitations converted invitations
* better error checking
* more logging
This commit is contained in:
Zach Copley
2011-06-21 13:25:05 -07:00
parent e53dad35b8
commit e7a4fee32b
5 changed files with 38 additions and 12 deletions

View File

@@ -86,7 +86,9 @@ class SiteConfirmReminderHandler extends QueueHandler
break;
case UserInviteReminderHandler::INVITE_REMINDER:
$invitation = new Invitation();
$invitation->find();
// Only send one reminder (the latest one), regardless of how many invitations a user has
$sql = 'SELECT * FROM (SELECT * FROM invitation WHERE registered_user_id IS NULL ORDER BY created DESC) invitees GROUP BY invitees.address';
$invitation->query($sql);
while ($invitation->fetch()) {
try {
$qm->enqueue(array($invitation, $opts), 'uinvrem');