]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/EmailReminder/lib/siteconfirmreminderhandler.php
* only send the one invitation reminder per email address, regardless of how many...
[quix0rs-gnu-social.git] / plugins / EmailReminder / lib / siteconfirmreminderhandler.php
index d75c40f5300f2eee46900a1cbf077ad367abc3e7..e5b4a5e2ab71848e40b30bc20b1bb0e8687630cf 100644 (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');