If captcha is installed and enabled for the user_register form, auto-registration will fail due to the captcha not being solved.
A patch is attached as one possible way to solve the issue.

Related discussion.

Steps to reproduce the issue:

1. Install Captcha
2. Install OpenID
3. Enable captcha on User Registration Form
4. Attempt OpenID registration via /user/register

Between making captcha openID-aware and making this module captcha-aware, this seems like the more direct route.

Comments

bdurbin’s picture

Title: Captcha on user_registraion conflicts with OpenID auto-registration » Captcha on user_registration conflicts with OpenID auto-registration
Status: Active » Needs review

A follow-up to the above: The decision to patch on OpenID as opposed to Captcha also takes advantage of the current relative hook execution order between the two modules.

Leeteq’s picture

Priority: Normal » Critical
chirale’s picture

StatusFileSize
new612 bytes

I try the patch, but I got "Hunk #1 FAILED at 467" on Drupal 6.4.
I re-implement the changes (patch attached) but OpenID registration failed.

joshk’s picture

FWIW, those needing quick resolution can do this with a custom form_alter like so:

function hook_form_alter(&$form, $form_state, $form_id) {
  if ($form_id == 'user_register' && $_GET['q'] == 'openid/authenticate') {
    unset($form['captcha']);
  }
}
joshk’s picture

Just another bonus, I had a similar problem w/logintoboggan's desire to validate a "confirm email address" field. Here's a fix to both this and captcha:

function hook_form_alter(&$form, $form_state, $form_id) {
  if ($form_id == 'user_register' && $_GET['q'] == 'openid/authenticate') {
    if (module_exists('captcha')) {
      unset($form['captcha']);
    }
    if (module_exists('logintoboggan')) {
      foreach($form['#validate'] as $key => $function) {
        if ($function == 'logintoboggan_user_register_validate') {
          unset($form['#validate'][$key]);
        }
      }
    }   
  }
}

Happy Drupaling!