{"action":"created","issue":{"url":"https://api.github.com/repos/ibericode/mailchimp-for-wordpress/issues/331","repository_url":"https://api.github.com/repos/ibericode/mailchimp-for-wordpress","labels_url":"https://api.github.com/repos/ibericode/mailchimp-for-wordpress/issues/331/labels{/name}","comments_url":"https://api.github.com/repos/ibericode/mailchimp-for-wordpress/issues/331/comments","events_url":"https://api.github.com/repos/ibericode/mailchimp-for-wordpress/issues/331/events","html_url":"https://github.com/ibericode/mailchimp-for-wordpress/issues/331","id":169913768,"number":331,"title":"Add filter for blacklisting IP addresses","user":{"login":"dannyvankooten","id":885856,"avatar_url":"https://avatars.githubusercontent.com/u/885856?v=3","gravatar_id":"","url":"https://api.github.com/users/dannyvankooten","html_url":"https://github.com/dannyvankooten","followers_url":"https://api.github.com/users/dannyvankooten/followers","following_url":"https://api.github.com/users/dannyvankooten/following{/other_user}","gists_url":"https://api.github.com/users/dannyvankooten/gists{/gist_id}","starred_url":"https://api.github.com/users/dannyvankooten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dannyvankooten/subscriptions","organizations_url":"https://api.github.com/users/dannyvankooten/orgs","repos_url":"https://api.github.com/users/dannyvankooten/repos","events_url":"https://api.github.com/users/dannyvankooten/events{/privacy}","received_events_url":"https://api.github.com/users/dannyvankooten/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ibericode/mailchimp-for-wordpress/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-08T12:43:43Z","updated_at":"2016-10-25T09:24:59Z","closed_at":null,"body":"As an additional anti-spam measure in case the bad guys are stupid enough to hammer a form from one single IP address."},"comment":{"url":"https://api.github.com/repos/ibericode/mailchimp-for-wordpress/issues/comments/255983701","html_url":"https://github.com/ibericode/mailchimp-for-wordpress/issues/331#issuecomment-255983701","issue_url":"https://api.github.com/repos/ibericode/mailchimp-for-wordpress/issues/331","id":255983701,"user":{"login":"dannyvankooten","id":885856,"avatar_url":"https://avatars.githubusercontent.com/u/885856?v=3","gravatar_id":"","url":"https://api.github.com/users/dannyvankooten","html_url":"https://github.com/dannyvankooten","followers_url":"https://api.github.com/users/dannyvankooten/followers","following_url":"https://api.github.com/users/dannyvankooten/following{/other_user}","gists_url":"https://api.github.com/users/dannyvankooten/gists{/gist_id}","starred_url":"https://api.github.com/users/dannyvankooten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dannyvankooten/subscriptions","organizations_url":"https://api.github.com/users/dannyvankooten/orgs","repos_url":"https://api.github.com/users/dannyvankooten/repos","events_url":"https://api.github.com/users/dannyvankooten/events{/privacy}","received_events_url":"https://api.github.com/users/dannyvankooten/received_events","type":"User","site_admin":false},"created_at":"2016-10-25T09:24:59Z","updated_at":"2016-10-25T09:24:59Z","body":"See https://github.com/ibericode/mc4wp-snippets/blob/master/forms/blacklist-email-addresses.php for a snippet doing just this.\r\n\r\n```php\r\n/**\r\n * Block certain email addresses from signing up through forms.\r\n */\r\nadd_filter( 'mc4wp_form_errors', function( $errors, MC4WP_Form $form ) {\r\n    $data = $form->get_data();\r\n    $email = strtolower( $data['EMAIL'] );\r\n    // add your blocked email addresses here.\r\n    $blocked_emails = array(\r\n        'someemail@email.com',\r\n        'someotheremail@email.com',\r\n    );\r\n    if( in_array( $email, $blocked_emails ) ) {\r\n        $errors[] = 'spam';\r\n    }\r\n    return $errors;\r\n}, 10, 2 );\r\n```"}}
{"actor":{"display_login":"dannyvankooten"}}