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) »
  • Matching Drupal user to contact record in CiviCRM Issue ...
Pages: [1]

Author Topic: Matching Drupal user to contact record in CiviCRM Issue ...  (Read 2949 times)

backdrifting

  • I post frequently
  • ***
  • Posts: 178
  • Karma: 2
Matching Drupal user to contact record in CiviCRM Issue ...
November 19, 2008, 10:23:05 pm
I have over 500+ contact records imported into CiviCRM as Organizations.  They have e-mail addresses entered.  When I go to create a Drupal user account for one of these contact/organizations, CiviCRM doesn't seem to check the matching e-mail - it creates a new contact record (individual) for the user.  I want them to match.  Is it possible to match Organization contacts to a Drupal account? 

It works when I try matching a Drupal user to a CiviCRM individual record.  CiviCRM sees it's a match and just links the 2 accounts as it should.  It doesn't create a duplicate.  But I can't get this to work for my organizations.

I'd hate to have to re-import all of my orgs as individuals.  Is there any method of doing this so they match?  You would think there shouldn't be a difference here since it's just checking on e-mail address.  So Organizations should match to a Drupal account if the e-mail is the same ... but I can't get it to work.

Also - I don't want to create Drupal accounts for all of my 500+ Orgs. Only for those Orgs that have valid e-mails and that are "distributor" status.  The reason I mention this is because I don't want to export and then import all the records into Drupal - I want to do it manually Org to Org.  So when I see an Org that I want to create a matching Drupal account for I want to be able to do this specifically at that point of time for that Org account.

Also - my contact matching rules are set correctly to check on e-mail address.

Any suggestions would be most welcome!  :)

BTW - I'm using Drupal 5.x and CiviCRM 2.0.6.

Thanks!

-backdrifting
« Last Edit: November 19, 2008, 10:34:11 pm by backdrifting »

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Matching Drupal user to contact record in CiviCRM Issue ...
November 20, 2008, 12:19:58 am
When you create Drupal user, CiviCRM always creates Contact of type "Individual".

IMO, best approach would be:

1. Export emails of Organizations from CiviCRM, that you want to have Drupal Accounts.
2. Use User Import, drupal module to create Drupal Accounts for those Organization.
3. Use "Synchronize Users to Contacts" feature in CiviCRM.

HTH

Kurund
Found this reply helpful? Support CiviCRM

backdrifting

  • I post frequently
  • ***
  • Posts: 178
  • Karma: 2
Re: Matching Drupal user to contact record in CiviCRM Issue ...
November 20, 2008, 05:07:35 pm
Ok, thanks.  It would be a nice enhancement/feature request for a future release of CiviCRM - to be able to sync Organization contacts.

-backdrifting

ancientwizard

  • Guest
Re: Matching Drupal user to contact record in CiviCRM Issue ...
December 20, 2008, 10:30:11 pm
Hi,

Don't know if anyone here still cares about this issue ...

I am on Drupal 5.12  and CiviCRM 2.0.7

I don't have the organization issue that interests you, but I am in the midst of substantial brain damage trying to get the users and contacts to simply sync.

This works in theory, but

1) works in practice successfully on first sync after install.  (except that the sync maps the email address in drupal to both the name field and the email address field in civicrm ignoring the actual data in the drupal username field.  Lobo has said that the code is written that way and needs a hack if you want it to do something else.

2) after the first sync, civicrm_og_sync.module throws fatal errors if you a) add a new organic group in drupal

3) CiviCRM does not seem to respond to new events being created in drupal or vice versa.

4) lobo mentioned that sync is not really supported in 2.0.x and was only included as developer code.  Support starts with 2.1.x (which is only compatable with drupal 6.x)

I'm trying to find my way to a decent workflow that will integrate/synchronize users (including names addresses assigned groups and tags), groups, and events

Anyone with ideas?

Thanks

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Matching Drupal user to contact record in CiviCRM Issue ...
December 21, 2008, 03:37:20 am
Quote
1) works in practice successfully on first sync after install.  (except that the sync maps the email address in drupal to both the name field and the email address field in civicrm ignoring the actual data in the drupal username field.  Lobo has said that the code is written that way and needs a hack if you want it to do something else.
If you are not aware, there is "Synchronize Users to Contacts" in Administer CiviCRM, that will sync "Drupal Users" with "CiviCRM Contacts". Currently it matches email address in Drupal with primary email address of CiviCRM Contact. If match is found then it links Drupal User with corresponding CiviCRM Contact, else it creates new Contact in CiviCRM.

Quote
2) after the first sync, civicrm_og_sync.module throws fatal errors if you a) add a new organic group in drupal
This module is for syncing Organic Groups with CiviCRM Groups. It is still one way sync. Few users in community seems to using it. So if you have any issues you should at least help to debug it. As Lobo mentioned "civicrm_og_sync.module" was a developer release in 2.0.x.

Quote
3) CiviCRM does not seem to respond to new events being created in drupal or vice versa.
CiviCRM events, ie CiviEvent component and Drupal Event module are two separate modules. So it won't sync with each other.

HTh

Kurund
Found this reply helpful? Support CiviCRM

ancientwizard

  • Guest
Re: Matching Drupal user to contact record in CiviCRM Issue ...
December 21, 2008, 10:56:35 am
Kurund,

Thanks for taking the time to reply.

I am not a coder.  So my best offering toward debug is to attempt to describe what the module is doing in my installation when I attempt to use it.  I hope that can be of value to someone.

I am aware of the one way user sync in the civicrm admin panel.  this does work for me (but having an email address appear in the name field for what will soon be several thousand contacts seems like a non-starter).  Lobo mentioned a place to look in the civicrm code to begin a hack, but it is way beyond my skill.  Perhaps someone will be interested.

Is there a way to get organic groups and civicrm groups synchronized after the first install of civicrm_og_sync ?  New groups simply seem to generate fatal civicrm errors.  I cant find any admin function for this like with synchronize users to contacts.   Does the group synchronize only happen on the first install?  If so, what is one to do about groups that get generated after that?

thnks

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: Matching Drupal user to contact record in CiviCRM Issue ...
December 21, 2008, 05:22:51 pm

As mentioned previously there are probably a few bugs and missing features with that module for 2.0.x. If you need to use that module, you might want to hire someone to help debug and fix the various issues associated with that module

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Matching Drupal user to contact record in CiviCRM Issue ...

This forum was archived on 2017-11-26.