X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FEmailReminder%2Flib%2Fsiteconfirmreminderhandler.php;h=e5b4a5e2ab71848e40b30bc20b1bb0e8687630cf;hb=5eba1030ae39038b7b6b0aad5de1043fae43e48d;hp=d75c40f5300f2eee46900a1cbf077ad367abc3e7;hpb=29403a764cf172f63d7e7f39b49fdd30c92d916e;p=quix0rs-gnu-social.git diff --git a/plugins/EmailReminder/lib/siteconfirmreminderhandler.php b/plugins/EmailReminder/lib/siteconfirmreminderhandler.php index d75c40f530..e5b4a5e2ab 100644 --- a/plugins/EmailReminder/lib/siteconfirmreminderhandler.php +++ b/plugins/EmailReminder/lib/siteconfirmreminderhandler.php @@ -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');