X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FMailing%2FForm%2FUnsubscribe.php;h=95a675965955cdc94a9d15d1de94864963300984;hb=93764e91c93a77272071798ad188bb5a00c0401c;hp=9184967f57e4659b9759ce942e1274dbc8c9ef1c;hpb=ee4ac4e666956c3255b24525be6fc992760513a8;p=civicrm-core.git diff --git a/CRM/Mailing/Form/Unsubscribe.php b/CRM/Mailing/Form/Unsubscribe.php index 9184967f57..95a6759659 100644 --- a/CRM/Mailing/Form/Unsubscribe.php +++ b/CRM/Mailing/Form/Unsubscribe.php @@ -16,6 +16,14 @@ */ class CRM_Mailing_Form_Unsubscribe extends CRM_Core_Form { + /** + * Prevent people double-submitting the form (e.g. by double-clicking). + * https://lab.civicrm.org/dev/core/-/issues/1773 + * + * @var bool + */ + public $submitOnce = TRUE; + public function preProcess() { $this->_type = 'unsubscribe'; @@ -121,7 +129,6 @@ class CRM_Mailing_Form_Unsubscribe extends CRM_Core_Form { CRM_Core_Session::setStatus($statusMsg, '', 'error'); } - } }