blaenk / wp-recaptcha

I gave ownership of this project to Google many years ago
Other
38 stars 16 forks source link

excempt users with previously approved comment #18

Open earlh opened 14 years ago

earlh commented 14 years ago

Hi --

I'd really like to be able to skip the captcha if the comment author has a previously approved comment, as tested by the email address and username. Ala the option "Comment author must have a previously approved comment" in the Discussion Settings. I'd be happy to help create this if someone could point me in the right directions -- I'm not a php dev, but I've written a bunch of rails.

Cheers, and thanks for the great plugin Blaenk.

blaenk commented 14 years ago

Yeah I was thinking about implementing something along these lines. I have to look into it though, I want to see if there's a way of using WordPress to see if the user has a previously approved comment, I imagine there is, otherwise the plugin would have to store a database of of emails which have been 'whitelisted'. This would be messy quickly and not very secure.

But I do want to implement something like this though, so do know it's on my mind (which is why I'm keeping it here). I am planning on first releasing the plugin rewrite, and then later implementing newer features, so I can't give an estimation as to when this will be implemented, but I am looking forward to it.

Thanks for the idea.

EDIT: Renamed the issue to be more appropriate.

earlh commented 14 years ago

Blaenk: The relevant code seems to be in wp-includes/comment.php if ( 1 == get_option('comment_whiltelist')) { // blah $ok_to_comment = $wpdb->get_var("SELECT comment_approved FROM $wpdb->comments WHERE comment_author = '$author' AND comment_author_email = '$email' and comment_approved = '1' LIMIT 1"); // blah }

blaenk commented 14 years ago

Wow that's great. I should be able to implement this for the next version then. Thanks.