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 »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Inherited membership based on relationship created before email address saved
Pages: [1]

Author Topic: Inherited membership based on relationship created before email address saved  (Read 2488 times)

jackrabbithanna

  • I post occasionally
  • **
  • Posts: 61
  • Karma: 3
  • Quick like bunny
    • http://www.skvare.com
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.23
  • MySQL version: 5.1
  • PHP version: 5.3.3
Inherited membership based on relationship created before email address saved
June 04, 2013, 09:49:50 am
Here's the scenario. My client is selling group memberships. We apply these group memberships to an Organization and individual's inherit a membership based on the entering their employer in the Employer field.The individual's membership is then created because of the employer/employee relationship.

I have the civicrm_entity drupal module installed. https://drupal.org/sandbox/eileen/1923028

I have created a rule to create a synced Drupal user account triggered by membership creation.

When creating a new individual contact, entering the first name and last name, employer, and email address then hitting save I get the error:
Error: SQLSTATE23000: Integrity constraint violation: 1062 Duplicate entry '' for key 'name'

What seems to be happening is that the inherited membership for the individual is being created BEFORE the email address is being stored in the database. The membership creation triggers the Create Synced Drupal User Rule described here: https://drupal.org/node/2001332
The rule tries to create the user before the email address is available....

This scenario happens when trying to create the contact with employer field filled out either manually via the CiviCRM admin, or if the employer field is used on a Profile being used on a member join contribution form.

Any thoughts on how to make this work right.....Why is the email address being stored AFTER the membership is created?

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Inherited membership based on relationship created before email address saved

This forum was archived on 2017-11-26.