By hixster on
Hi All,
Is there a way to prevent users with email address from certain domains posting comment in web forms.
Ie: prevent users from @hotmail, @yahoo etc from posting on forms?
I have searched extensively for a module to do this, i've had a look at Mollom but don't think it does what I want.
If anyone has done this please let me know.
regards
Hix
Comments
Are these users signed-in to
Are these users signed-in to the site or not? If not then they could just make up any old email address to get past the restriction...
gpk
----
www.alexoria.co.uk
Not registered users, just
Not registered users, just anonymous, I realise it's easy to bypass, but my client has asked specifically for that functionality.
Drupal Web Designers Surrey South East England www.lightflows.co.uk
Basically you need to
Basically you need to intercept form submission and check the email field at that point. This is the validator for the entire comment form http://api.drupal.org/api/function/comment_validate/6, you can also set one specifically for a particular for element. You could either do this in a tiny custom module or may try contrib Rules/Rules Forms to set up the additional validation checking through Drupal's admin UI, though you might find that even more complex and you might have to code up the email checker anyway!! (albeit only a line or 2).
gpk
----
www.alexoria.co.uk