Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
contact_flood_control()
in ContactFormBlock::build()
appears to be totally bogus - I can find no D6, D7 or D8 API reference for this? An attempt is made to include contact.pages.inc, but (in D7) that contains no such function anyway.
I guess we should be retrieving contact module's flood configuration, then doing doing something like:
$flood = \Drupal::flood();
if (!$flood->isAllowed('contact', $time, $interval) {
// Set a message and throw a Symfony access denied error?
}
But I don't think flood control on the core contact page is working yet anyway.
Comment | File | Size | Author |
---|---|---|---|
#2 | formblock-contact-flood-control-2175401-2.patch | 928 bytes | John Pitcairn |
Comments
Comment #1
John Pitcairn CreditAttribution: John Pitcairn commentedComment #2
John Pitcairn CreditAttribution: John Pitcairn commentedThis patch removes the flood control check and adds a todo comment, so the module is at least usable for now.
Comment #3
John Pitcairn CreditAttribution: John Pitcairn commentedComment #4
mikey_p CreditAttribution: mikey_p commented