From: Mathieu Lutfy Date: Tue, 31 Mar 2015 18:02:01 +0000 (-0400) Subject: CRM-6131: Allow to override the dedupe rule used when submitting a form (useful for... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=90d804edf3e14fca638b66b22e6a461a5a52af0f;p=civicrm-core.git CRM-6131: Allow to override the dedupe rule used when submitting a form (useful for buildForm hooks). --- diff --git a/CRM/Profile/Form.php b/CRM/Profile/Form.php index 257de4cbd3..cf276a1c37 100644 --- a/CRM/Profile/Form.php +++ b/CRM/Profile/Form.php @@ -111,6 +111,12 @@ class CRM_Profile_Form extends CRM_Core_Form { */ public $_isUpdateDupe = 0; + /** + * Dedupe using a specific rule (CRM-6131). + * Not currently exposed in profile settings, but can be set in a buildForm hook. + */ + public $_ruleGroupID = NULL; + public $_isAddCaptcha = FALSE; protected $_isPermissionedChecksum = FALSE; @@ -946,7 +952,8 @@ class CRM_Profile_Form extends CRM_Core_Form { $ids = CRM_Dedupe_Finder::dupesByParams($dedupeParams, $ctype, $ruleType, - $exceptions + $exceptions, + $form->_ruleGroupID ); if ($ids) { if ($form->_isUpdateDupe == 2) {