Skip to content

Commit

Permalink
Move recaptcha and mailchimp integrations to event handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
themightychris committed Jan 4, 2016
1 parent 29d1988 commit da7f74f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 32 deletions.
@@ -0,0 +1,9 @@
<?php

if ($recaptcha = \RemoteSystems\ReCaptcha::getInstance()) {
$recaptchaResponse = $recaptcha->verify($_EVENT['requestData']['g-recaptcha-response'], $_SERVER['REMOTE_ADDR']);

if (!$recaptchaResponse->isSuccess()) {
$_EVENT['additionalErrors']['ReCaptcha'] = 'Please prove that you aren\'t a spam robot by completing the reCAPTCHA';
}
}
@@ -0,0 +1,16 @@
<?php

// add new user to a MailChimp list (see http://forum.laddr.us/t/mailchimp-integration/26)
#\RemoteSystems\MailChimp::call('lists/subscribe', [
# 'id' => 'YOUR_LIST_ID_HERE',
# 'email' => [
# 'email' => $_EVENT['User']->Email
# ],
# 'merge_vars' => [
# 'FNAME' => $_EVENT['User']->FirstName,
# 'LNAME' => $_EVENT['User']->LastName
# ],
# 'double_optin' => false,
# 'replace_interests' => false,
# 'send_welcome' => false
#]);
32 changes: 0 additions & 32 deletions php-config/Emergence/People/RegistrationRequestHandler.config.php

This file was deleted.

0 comments on commit da7f74f

Please sign in to comment.