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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Drupal accounts not linking to CiviCRM record
Pages: [1]

Author Topic: Drupal accounts not linking to CiviCRM record  (Read 1243 times)

websynapse

  • I post frequently
  • ***
  • Posts: 216
  • Karma: 3
    • Ryan Kennedy
  • CiviCRM version: 4.3.7
  • CMS version: Drupal 6
Drupal accounts not linking to CiviCRM record
April 20, 2010, 03:51:12 pm
Testing our new 3.1.3 installation, I'm finding that new Drupal users I add with the same email as a contact in CiviCRM aren't being linked to that record. Instead it's creating a new duplicate record with only the email address.

I'm probably missing something obvious in Admin settings, though no idea what. Is there a different way to create Drupal users for contacts?

Thanks for any help.

JoopSJ

  • I post occasionally
  • **
  • Posts: 80
  • Karma: 2
Re: Drupal accounts not linking to CiviCRM record
April 23, 2010, 12:39:20 pm
Yeah, it should work that way.
If you create a drupal (user) and that user is present as a contact in civi those to will be combined in the table civicrm_uf_mtach.
The drupal_id (uf_id) will get connected to the contact_id (civi)

Is your dedupe settings correct? I guess that these setting determin whether the user matches the contact. Default, the email will be compared

Marty

  • I post occasionally
  • **
  • Posts: 67
  • Karma: 14
    • Boulder County Arts Alliance
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.37
  • PHP version: 5.4.27
Re: Drupal accounts not linking to CiviCRM record
April 25, 2010, 07:45:47 pm
I'm using 3.1.4 and having the same problem. New Drupal users aren't being linked to an existing contact with the same email address and a duplicate contact is created. I verifiied my dedupe rules are matching on only the email address.

Could somone please verify if this is really a problem?

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: Drupal accounts not linking to CiviCRM record
April 25, 2010, 10:23:57 pm

your best bet will be to investigate the code and help debug / fix the issue

CRM/Core/BAO/UFMatch.php, function synchronize

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

Marty

  • I post occasionally
  • **
  • Posts: 67
  • Karma: 14
    • Boulder County Arts Alliance
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.37
  • PHP version: 5.4.27
Re: Drupal accounts not linking to CiviCRM record
April 26, 2010, 06:19:53 pm
I verified that a change in CRM_Dedupe_BAO_RuleGroup::thresholdQuery() between 3.1.3 and 3.1.4 seems to have broken synchronization of contacts to Drupal users during Drupal user registration.  When I revert back to the 3.1.3 version of the function, synchronization works. The changes look like they have to do with ACL permissioning through CRM_Contact_BAO_Contact_Permission::cacheClause(), but I don't understand enough about this code to suggest a fix.

Deepak Srivastava

  • Ask me questions
  • ****
  • Posts: 677
  • Karma: 65
Re: Drupal accounts not linking to CiviCRM record
April 26, 2010, 10:48:04 pm
Hey Marty,

Can we get ssh access to your setup - http://wiki.civicrm.org/confluence/display/CRMDOC/SSH+Access+Requirements.

As per 3.1.4 code login process must go through email - sync and not dedupe process. Would like to check / investigate - whats going on.

Deepak
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

Marty

  • I post occasionally
  • **
  • Posts: 67
  • Karma: 14
    • Boulder County Arts Alliance
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.37
  • PHP version: 5.4.27
Re: Drupal accounts not linking to CiviCRM record
April 27, 2010, 04:33:26 pm
Hi Deepak,

It's not the login process that's broken, but rather the process of adding a new Drupal user.  This process invokes the Drupal user hook function (civicrm_user() in civicrm.module) with an operation type 'insert' (not 'login').  If I add the $isLogin = true parameter when calling CRM_Core_BAO_UFMatch::synchronize() during the insert process in the same fashion as the login process, then the Drupal user is linked properly to the CiviCRM contact.

I created a new issue for this: http://issues.civicrm.org/jira/browse/CRM-6166

Marty
« Last Edit: April 28, 2010, 12:07:24 pm by Marty »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Drupal accounts not linking to CiviCRM record

This forum was archived on 2017-11-26.