I'm involved in the development with the Janrain Engage module (http://drupal.org/project/rpx) and noticed that when Mollom is also enabled on the user registration form, then the word verification always fails the first time around (since the Janrain Engage authentication widget doesn't have a Mollom captcha built in).
Is there any way currently to programmatically bypass the Mollom check if users are authenticating with a verified third-party service like Janrain Engage?
Thanks,
Ben
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | mollom.form-alter.4.patch | 1.18 KB | sun |
Comments
Comment #1
sunYou should already be able to do this by adjusting
Note that these values are initialized only once. Therefore, if you intend to re-enable the Mollom validation in a subsequent form submission/rebuild, then you should backup the original values somewhere else in $form_state and restore them.
Also, you should account for both, since users might have chosen to protect the form via text analysis instead of a CAPTCHA, which is only possible if the registration form contains additional text fields besides name and e-mail.
Comment #2
sunMarking this as fixed, unless #1 doesn't work for you.
Comment #3
geokat commentedHi sun,
Thanks for your reply. #1 seems to work, but it triggers a bunch of
notices:
To test this, I wrote a simple hook_form_FORM_ID_alter()
implementation (my_module_form_user_register_form_alter()) which does
nothing but this:
Is there anything I might have overlooked? I use mollom 7.x-1.0.
Thanks,
George
Comment #4
sunCan you try whether attached patch resolves the PHP notices?
Comment #5
sunI'm confident that this patch will resolve the issue.
Problem space being that hook_form_alter() is invoked before the #process callback mollom_process_mollom(), so programmatically overriding the 'require_analysis' or 'require_captcha' flags in hook_form_alter() leads to all other keys in $form_state['mollom'] being undefined.
Comment #6
sunComment #7
dries commentedI tried to apply this patch but it failed:
I'll retest this patch to make sure it is not my setup.
Comment #8
dries commented#4: mollom.form-alter.4.patch queued for re-testing.
Comment #9
dries commentedAh, I was trying to apply this against the wrong branch. Committed it to the 'master' branch. Should probably be ported to the other branches.
Comment #10
sunThanks for reporting, reviewing, and testing! Committed to 6.x-1.x.
A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.