Closed m-pire closed 4 months ago
My tests for a newsletter subscription with activated double-opt-in setting didnt worked out, instead the contact was added directly to the configured group.
@m-pire Just to make sure I understand you correctly: The contact should be added to the group with a pending status. In your case, the contact is added to the group with the status Added
?
And another thing: the double opt-in setting in TwingleMANAGER is not taken into account by CiviCRM, because Twingle sends a DOI mail, but cannot pass on the updated status to CiviCRM (see here #34 ). Therefore, I have developed the option to let CiviCRM handle the DOI (see here #38). This must be activated in the respective Twingle profile in CiviCRM.
Dear @MarcMichalsky, Yes: The contact should be added to the group with a pending status. In your case, the contact is added to the group with the status Added.
I set up a fresh install of CiviCRM and this extension - cest voila! We are using the extension with version 1.2.2 in our PROD, which does not have the mentioned setting "Use Double-Opt-In for newsletter" in its profile settings. In my freshly installed Civi I use 1.3, there it is. Sorry thad I bothered you with this and thank you for getting into this!
You're welcome! I'm happy to help!
My tests for a newsletter subscription with activated double-opt-in setting didnt worked out, instead the contact was added directly to the configured group.
As I assume, there is an error in api/v3/TwingleDonation/Submit.php, Line 533-537:
if ( (bool) $profile->getAttribute('newsletter_double_opt_in') && (bool) ($params['newsletter'] ?? FALSE) && is_array($groups = $profile->getAttribute('newsletter_groups')) )
From my understanding,
$profile
is used for the configured twingle profile within CiviCRM, and the array$params
contains the values handed over by twingle. Whilst the parameter newsletter_double_opt_in is not beeing configured in the profile within CiviCRM but in the twinglemanager settings: Should this beif ( (bool) $profile->$params['newsletter_double_opt_in'] && (bool) ($params['newsletter'] ?? FALSE) && is_array($groups = $profile->getAttribute('newsletter_groups')) )
with a an according declaration in
function _civicrm_api3_twingle_donation_Submit_spec
?Thank you so much!