3

I'm running CiviCRM 4.7.10 and Drupal 7.50.

I have had a Civi database for a while, but am now wanting to give people front end accounts in order to use some features there.

My problem is that when a user, who is already a contact in Civi, tries to create a Drupal account, they get the rather unceremonious "DB error: already exists".

I'm confused because I keep reading that Civi is set up to automatically merge new users with existing contacts on matching emails (or whatever criteria is set in the Unsupervised deduping settings for Individuals - mine is using email only at the moment).

I would love to understand how this is supposed to work and how to fix it when it doesn't.

Thanks, Lewis

3 Answers 3

1

How are you trying to create these Drupal user accounts? We have used User Import module : https://www.drupal.org/project/user_import - for this and it works great. It's really neat in that you can export a Group of Contacts from your CiviCRM -> batch CSV upload them into Drupal using user_import module + create AccountNames (e.g. FirstNameLastName format) and/or dispatch links to everyone as you create their accounts.

For details please see here: https://wiki.civicrm.org/confluence/display/CRMDOC/Creating+a+Drupal+user+for+every+CiviCRM+contact

1
  • 1
    Thanks. Apologies for disappearing for about two months! I have used user_import at times in the past to great success. My issue is that I wanted to let my Civi contacts choose whether to create an account for themselves in Drupal, so that I didn't have hundreds of inactive accounts in Drupal that no one wanted. It's when one of those contacts goes to create their own Drupal account that the problem occurs.
    – Lewis
    Sep 6, 2016 at 9:10
1

Already exists could be in one of two places: Creating the civi contact or creating the uf record.

I suspect it's the latter, but play with the api to confirm. Also, turn on stack trace (debug settings), retry, and post the full output here.

0

This question is a few years old now, but I faced the same problem today when creating a new user account in Drupal. We're running CiviCRM 5.x and Drupal 7.x.

I got around the issue by firstly deleting the offending user account in Drupal and then going to the contact record in CiviCRM of the person that I was trying to create a user account for. In the contact record, click on the 'Actions' button and then select 'Create User Record'. Fill out the necessary fields and create the user account. Everything then worked beautifully.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.