CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • validation error with user registration via CiviCRM form
Pages: [1]

Author Topic: validation error with user registration via CiviCRM form  (Read 4053 times)

scubasmurf

  • Guest
validation error with user registration via CiviCRM form
March 28, 2009, 10:45:43 pm
Hi,

I am using the form at "civicrm/contribute/transact?reset=1&id=1" for Drupal User Registration and CiviCRM Member Registration in one go. Under profile settings I have recaptcha and force Drupal user account registration options activated.

As I would expect, if I set Drupal so that only the administrator can create Drupal user accounts then while the CiviCRM form does go through just fine, the Drupal account is not set up at the same time.

So I set Drupal so that anyone can create a Drupal user account and then turn on Drupals captcha module for User Registration (in addition to CiviCRM recaptcha) then the CiviCRM form goes through just fine but again the Drupal user account is not created but this time I get a captcha validation error. It would appear that Drupal is looking for captcha validation of the Drupal captcha when CiviCRM tries to create the Drupal user account.

(I am using image captcha with Drupal and recaptcha with CiviCRM so I can tell were the validation error is coming from)

If I turn off Drupals captcha module for User Registration then the CiviCRM form works just fine, but then I have no way of stopping bots creating Drupal user accounts via Drupals User Registration and I would rather not just rely on email validation.

Can someone provide any tips on putting some form of captcha on both User Registration via Drupal and via the CiviCRM form?

Thank you.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: validation error with user registration via CiviCRM form
March 29, 2009, 07:25:24 am

the easiest work around, might be to enable a simple profile within CiviCRM (that uses ReCAPTCHA) and use it for drupal user registration (in the settings file check it for user registration). That will require a captcha for drupal registration also

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

scubasmurf

  • Guest
Re: validation error with user registration via CiviCRM form
March 29, 2009, 03:07:26 pm
Thanks for getting back to me. These are the settings I used...

CiviCRM Profile 1 – Simple, required for all users of the site
   Settings:
      Profile - checked
      User Registration – checked
      View/Edit User Account – checked
      Search - not checked
      CiviContribute – checked
   Advanced Settings:
      Include reCAPTCHA? – checked
      Account creation required – checked

CiviCRM Profile 2 – Membership specific
   Settings:
      Profile - checked
      User Registration – not checked
      View/Edit User Account – checked
      Search - not checked
      CiviContribute – checked
   Advanced Settings:
      Include reCAPTCHA? – not checked
      Account creation required – not checked

Include Profile 1 and Profile 2 in the CiviCRM membership form

Drupal Settings:
   Captcha for User Registration - none
   Visitors can create accounts and no administrator approval is required - checked
   Require e-mail verification when a visitor creates an account - checked

...then Drupal will use the CiviCRM reCAPTCHA from Profile 1 at "/user/register" as well as CiviCRM using it at "/civicrm/contribute/transact?reset=1&id=1"

I gave it a go, but no captcha was displayed at /user/register. Did I miss something? Do I need to uninstall Drupal captcha module?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: validation error with user registration via CiviCRM form
March 30, 2009, 07:52:03 am

argh. sorry. i forgot that we dont display civicrm captcha on drupal pages. I'm not sure of the reason why

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

starlily

  • Guest
Re: validation error with user registration via CiviCRM form
May 06, 2009, 07:07:20 pm
Oh nevermind, I am tired :(

Lily
« Last Edit: May 06, 2009, 07:48:50 pm by starlily »

matthewpetty

  • Guest
Re: validation error with user registration via CiviCRM form
July 09, 2009, 06:58:37 am
Did this ever get filed as a bug?

The suggested workaround is not appropriate for sites using certain Drupal modules that present their own registration/login links to anonymous users, such as Organic Groups. Without a permanent redirect of the Drupal registration page to a Civicrm registration profile, it is impossible to guarantee that a user won't be able to find the Drupal registration page.

bpayst

  • I’m new here
  • *
  • Posts: 16
  • Karma: 3
Re: validation error with user registration via CiviCRM form
December 08, 2009, 07:38:36 am
I would be interested in any updates on this as well. I had to disable the Drupal Captcha (via reCaptcha) implementation for user registrations as the reCaptcha form is not exposed on the CiviCRM sign up page and it was causing new member sign ups to fail with the error:

CAPTCHA validation error: unknown CAPTCHA session ID.

The fix is to disable the Captcha requirement for Drupal registrations, but as soon as I did that I started getting spam account registrations again. Enabling reCaptcha in the CiviCRM profile does not fix it as it does not create the same session ID as the Drupal reCaptcha and therefore does not validate.

It seems the spammers are getting smarter and are doing email confirmations as well, so the reCaptcha process is becoming more critical to preventing them from getting in.

scubasmurf

  • Guest
Re: validation error with user registration via CiviCRM form
December 08, 2009, 01:36:39 pm
On my site all new Drupal users need to have a CiviCRM membership first. My solution was to:

CiviCRM Settings:
   enable the CiviCRM CAPTCHA
   enable “Require Membership Signup” under CiviCRM Configure Contribution Page

Drupal Settings:
   disable the Drupal CAPTCHA
   enable “Visitors can create accounts and no administrator approval is required” under Drupal User settings
   enable “Require e-mail verification when a visitor creates an account” under Drupal User settings

Then use the Drupal Path Redirect module to redirect http://www.example.com/user/register to http://www.example.com/civicrm/contribute/transact?reset=1&id=1

This has worked very well for me.
« Last Edit: December 08, 2009, 01:39:17 pm by scubasmurf »

bpayst

  • I’m new here
  • *
  • Posts: 16
  • Karma: 3
Re: validation error with user registration via CiviCRM form
December 09, 2009, 07:13:10 am
That's the approach I'm thinking I will take as well. Still, it would be nice if the Drupal Captcha pieces were exposed in CiviCRM. Not a huge deal, but would make for a cleaner integration.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • validation error with user registration via CiviCRM form

This forum was archived on 2017-11-26.