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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • More subtle user-to-contact connections
Pages: [1]

Author Topic: More subtle user-to-contact connections  (Read 1130 times)

secularaugust

  • I’m new here
  • *
  • Posts: 26
  • Karma: -1
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.22
  • MySQL version: 5.1.41-3ubuntu12.10
  • PHP version: 5.3
More subtle user-to-contact connections
December 17, 2009, 01:46:24 pm
So I'm aware of the Synchronize Users-to-Contacts function (http://wiki.civicrm.org/confluence/display/CRMDOC/Synchronize+Users-to-Contacts).  And I'm also aware that civicrm_uf_match is where the links between users and contacts are kept.  I'm wondering if there is a built-in way to link only selected contacts to users.

I have a Drupal install that we've been using since 2005.  We wrote a custom membership module to make some users members.  I want to migrate from our custom code to CiviCRM.  Specifically, I want to import all those members into CiviCRM as contacts, but I don't want the non-member Drupal users to create contacts... most of them are long-abandoned accounts that people created to post one comment or the like (I'm sure some are also spam-bots).  I am happy to write a script to insert all of the right data into civicrm_uf_match.  I just don't want to reinvent the wheel or break something by doing this.

I tried importing the Drupal id for the members in the external_identifier field... the numbers imported fine, but create no link between the contact and the Drupal users that I could see.  I wasn't really expecting this to work, but I figured it was worth a shot.

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: More subtle user-to-contact connections
December 18, 2009, 03:22:25 am
You can export drupal's "mail" field along with other data for members ( in your module) and then import that data in CiviCRM. So whenever those member logs in "civicrm_uf_match" table will automatically link civicrm and drupal.

Does this make sense ?

Kurund
Found this reply helpful? Support CiviCRM

secularaugust

  • I’m new here
  • *
  • Posts: 26
  • Karma: -1
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.22
  • MySQL version: 5.1.41-3ubuntu12.10
  • PHP version: 5.3
Re: More subtle user-to-contact connections
December 21, 2009, 11:12:17 am
Kurund,

So you're saying that if I import their email address that when they log into a our CiviCRM enabeled version of Drupal it'll automatically link their Drupal user with their CiviCRM contact record? 

Thanks.

Quote from: Kurund Jalmi on December 18, 2009, 03:22:25 am
You can export drupal's "mail" field along with other data for members ( in your module) and then import that data in CiviCRM. So whenever those member logs in "civicrm_uf_match" table will automatically link civicrm and drupal.

Does this make sense ?

Kurund


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: More subtle user-to-contact connections
December 22, 2009, 01:39:07 am
Quote
So you're saying that if I import their email address that when they log into a our CiviCRM enabeled version of Drupal it'll automatically link their Drupal user with their CiviCRM contact record?

Yes. If drupal mail = civicrm primary email then it creates entry in civicrm_uf_match.

Kurund
Found this reply helpful? Support CiviCRM

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • More subtle user-to-contact connections

This forum was archived on 2017-11-26.