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 CiviContribute (Moderator: Donald Lobo) »
  • DB error on matching new Drupal user when 2 contacts share email address
Pages: [1]

Author Topic: DB error on matching new Drupal user when 2 contacts share email address  (Read 605 times)

jamien-www.compucorp.co.uk

  • I’m new here
  • *
  • Posts: 20
  • Karma: 0
  • CiviCRM version: 3.4 / 4.0
  • CMS version: Drupal 7.0
  • MySQL version: 5.5
  • PHP version: 5.3.7
DB error on matching new Drupal user when 2 contacts share email address
May 11, 2012, 06:26:43 am
On one of our implementations Civi generates a DB error when a new user signs up through drupal to make a donation or personal campaign page (possibly in other scenarios) and where the email address used is already used by 2 or more contacts in CiviCRM. The system tries to link both of the contacts to the drupal user and an error is shown when the second link is unable to be made, then forces people to return to the home screen.

Has anyone else encountered this issue?

Although its not the perfect fix but we are intending to modify code to:

- On create a new user
- Check whether the email address is used by more then one contact in civicrm
- If so, create new contact rather then try and match
- Admin can then deduplicate manually

Any thoughts? Should this be raised as a bug?

Noted this similar issue but think this is to do with one of the contacts already having a drupal ID:

http://issues.civicrm.org/jira/browse/CRM-9091

Thanks

Jamie

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: DB error on matching new Drupal user when 2 contacts share email address
May 11, 2012, 06:40:42 am
What is the use case for multiple contacts sharing email addresses? Generally speaking, emails are unique for each contact.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

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: DB error on matching new Drupal user when 2 contacts share email address
May 11, 2012, 09:07:19 am

jamie:

can u elaborate the steps in a bit more details. From what i understand:

1. The same email address is used by more than 1 contact

2. When a user registers with the above email address, it gives an error?

is this corrrect? wanna get on irc and we can discuss and figure out a fix

thanx

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

jamien-www.compucorp.co.uk

  • I’m new here
  • *
  • Posts: 20
  • Karma: 0
  • CiviCRM version: 3.4 / 4.0
  • CMS version: Drupal 7.0
  • MySQL version: 5.5
  • PHP version: 5.3.7
Re: DB error on matching new Drupal user when 2 contacts share email address
May 28, 2012, 03:31:30 am
Hi Lobo - sorry been so slow to come back on this - didnt set notifications!

Yes - steps as you described. I think the issue is with the contact matching table. Civi tries to post two users with the same email address to this table when it finds a match and you get a DB error as email field should be unique.

Use case -

We imported some old data for a customer and some of the contacts were duplicated or incomplete and used the same email address. Also some couples may use the same email address.

Please send me an email and we can arrange - I'm free this afternoon (UK time) or wed if you want to run through, otherwise please arrange a time with erawat to discuss.

best

Jamie

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • DB error on matching new Drupal user when 2 contacts share email address

This forum was archived on 2017-11-26.