Closed (fixed)
Project:
CAPTCHA
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
2 Feb 2010 at 00:50 UTC
Updated:
21 Mar 2011 at 22:25 UTC
When using ubercart with the anonymous checkout option it does this call:
drupal_execute('user_login', $form_state);
Since they do not pass the answer to the captcha question through the login fails.
A possible solution would be to add to the captcha_validate() function a check for some sort of override.
For example, maybe do (just a suggestion, not an actual solution):
<?php
if ($form_state['override_captcha_check']) {
// Skip the answer check or populate answer field with correct answer and continue.
}
?>
Then, whenever a captcha form is called programmatically this value can be passed through in the form state.
Comments
Comment #1
agileware commentedActually to be more specific, it fails because 'SELECT solution FROM {captcha_sessions} WHERE csid = %d AND status = %d'
doesn't return because csid is NULL because there is no clicked button in $form_state.
This means it can't be overridden by ubercart adding it's own $element['#captcha_validate'] function.
Comment #2
agileware commentedFor reference this is the error you get:
Comment #3
agileware commentedI have also started an issue for ubercart regarding this.
See #701912: Anonymous checkout doesn't work with captcha enabled on the user login form
Maybe it could be better solved by them changing their login process.
Comment #4
soxofaan commentedAnother possible solution is maybe to create a small glue module that removes the CAPTCHA form element in hook_form_alter when doing the anonymous checkout
Comment #5
agileware commentedYeah, that kind of solution would probably be best as it doesn't involve changing either of the modules core functionality.
That's something that should be done on the ubercart end so I'll close this one.
Thanks for the suggestion.
Comment #7
metajunkie commentedWhere can I find this being followed up? Is there a link to a new thread? Is it on this site, or the Ubercart site? I still have this issue.
Comment #8
agileware commented@metajunkie:
You should probably read the whole issue, it's not very long.
The link to the ubercart issue is in comment #3.