I am starting to get several spambot registrations a day. I can use mollom to add a captcha to the standard user registration form. But, the Join and Learn block is still open for registrations without captcha.

What are the best practices for using Mollom in Commons to reduce spam registrations?
Is there a way for mollom to add a captcha to the profile page where the initial password would be set?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ezra-g’s picture

Title: Mollom and Join and Learn block » "Join and Learn block" doesn't enforce Mollom, overwrites submit & access callbacks
Priority: Normal » Major

Thanks for pointing this out.

Looking at commons_core_join_form() it looks like Commons is overwriting any existing submission and validation callbacks, rather than adding to the ones that are already exist.

This form should probably be refactored.

mstef’s picture

The problem is that the "Join and Learn" block is not the user registration form - despite it essentially being the same thing. If you look at the code for that block, the function starts by grabbing the form array created by user_register(), but makes the necessary alterations. The reason why a form_alter cannot be used is because then the user registration block would be altered to look like this block wherever it is used.

I can think of two solutions. 1) Use the mollom API (assuming this exists) to register the Join & Learn form with Mollom or 2) do the form alter on the normal user_registration form, but use the block callback to set a static cache indicating that we're requesting the Join & Learn block. I hope that makes sense.

david.moore.ipg’s picture

Maybe just add a hidden honeypot to the form that mollom monitors and rejects if it is filled.

mstef’s picture

Status: Active » Needs review
FileSize
958 bytes

Implemented mollom hooks to support the form.

ezra-g’s picture

Version: » 6.x-2.x-dev
Issue tags: +Commons 2.7 radar

Tagging this for review in time for the 2.7 release.

ezra-g’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Hadi Farnoud’s picture

Status: Closed (fixed) » Needs review

the patch did not solve the problem for me. is there any additional step I have to take?

Hadi Farnoud’s picture

Status: Needs review » Closed (fixed)

nevermind, it was block cache. works like a charm