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 Drupal Modules (Moderator: Donald Lobo) »
  • (SOLVED) Duplicate Drupal users attached to same Contact record
Pages: [1]

Author Topic: (SOLVED) Duplicate Drupal users attached to same Contact record  (Read 1900 times)

awasson

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 7
  • Living in a world of Drupal / CiviCRM
    • My Company: Luna Design
  • CiviCRM version: Latest
  • CMS version: Drupal 6/7/8
  • MySQL version: 5.x
  • PHP version: 5.3.x
(SOLVED) Duplicate Drupal users attached to same Contact record
September 21, 2011, 07:49:08 pm
The title best describes what I think is going on... I receive a "DB Error: already exists" if I try to synchronize users to contacts. I am using civiCRM 3.1 and am in the process of doing an update to civiCRM 3.4.5 which will be completed this evening.

The error info array provides me with the user id that is causing the error and upon some investigation I can see that the individual has two Drupal user accounts and I can only assume that when we imported the contact data, the two accounts were attached to a single contact record somehow. So far I have been hunting and deleting the trouble accounts (one throws errors, the other doesn't) however it is time consuming and tedious. Is this something that has been documented and is there a way to get a report of all troubled accounts so I can go in and remedy this faster?

Thanks,
Andrew 
« Last Edit: September 22, 2011, 12:35:54 am by awasson »
My CiviCRM Extension Workshop: https://github.com/awasson

e_mason

  • I post occasionally
  • **
  • Posts: 65
  • Karma: 1
  • Eliot Mason
  • CiviCRM version: 4.05
  • CMS version: Drupal 7
  • MySQL version: 5.1xx
  • PHP version: 3.53
Re: Duplicate Drupal users attached to same Contact record
September 21, 2011, 10:20:02 pm
do the contacts have the same email address (or any other column with the same data in the drupal users table?  something like "select email, count(email) as freq from users where freq>1" will show you the dupes.

btw - it seems that Drupal does most of its duplicate checking in its code and doesn't rely on the database to enforce unique entries for email.  Thus if you've been manipulating the data directly, its possible you ended up with some dupes that you couldn't have entered from the drupal front end.

awasson

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 7
  • Living in a world of Drupal / CiviCRM
    • My Company: Luna Design
  • CiviCRM version: Latest
  • CMS version: Drupal 6/7/8
  • MySQL version: 5.x
  • PHP version: 5.3.x
Re: (SOLVED) Duplicate Drupal users attached to same Contact record
September 22, 2011, 12:35:24 am
Hi Mason,
Thanks for the reply. I think there might have been a bug in civiCRM 3.1 where it created Drupal user accounts when we imported civiContacts and somehow managed to produce Drupal users with the same email address. I didn't think that was possible but it definitely did happen in this case. Fortunately we had a successful update to civiCRM 3.4 and I was able to synch Contacts to Users with zero errors and it seems perfectly stable (touch wood)  ;D

In summary the issue was resolved by upgrading to the latest version.   
My CiviCRM Extension Workshop: https://github.com/awasson

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • (SOLVED) Duplicate Drupal users attached to same Contact record

This forum was archived on 2017-11-26.