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) »
  • Drupal user_save() creates Drupal user, CiviCRM contact ... but no uf_match
Pages: [1]

Author Topic: Drupal user_save() creates Drupal user, CiviCRM contact ... but no uf_match  (Read 2040 times)

michaellenahan

  • I post occasionally
  • **
  • Posts: 30
  • Karma: 0
    • mick.appspot.com
Drupal user_save() creates Drupal user, CiviCRM contact ... but no uf_match
December 07, 2011, 07:32:24 am
Hi there,

In my Drupal module I have some code which creates a user and then does a user_save().

This creates a Drupal user as expected. Also, "auto-magically" a CiviCRM contact is created (with just the email address, nothing else).

What I was also expecting to see was an entry in the uf_match table linking the Drupal user with the CiviCRM contact, but this is not being created.

My question: should a uf_match entry be there? Or should I do something to create it?

I've searched the web and the forums, but my google-fu is not strong today!

Michael

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: Drupal user_save() creates Drupal user, CiviCRM contact ... but no uf_match
December 07, 2011, 06:49:41 pm
Michael,

Basically below function in civicrm.module is used to create uf match record.

CRM_Core_BAO_UFMatch::synchronize( ..... );

may be check civicrm_form_data() in civicrm.module

HTh

Kurund
Found this reply helpful? Support CiviCRM

Barnacle

  • I post occasionally
  • **
  • Posts: 62
  • Karma: 2
    • White Fuse Media
  • CiviCRM version: 4.4
  • CMS version: Drupal 7
  • MySQL version: 5.x
  • PHP version: 5.3
Re: Drupal user_save() creates Drupal user, CiviCRM contact ... but no uf_match
August 29, 2013, 08:31:50 am
Hi,

I'm trying to use the CiviCRM API to create Drupal user record from a CiviCRM contact. If I use UFMatch 'create' in the API will this link a Drupal user with a CiviCRM contact? Or do I have to call the CRM_Core_BAO_UFMatch::synchronize() function instead?
--
http://whitefusemedia.com/

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Drupal user_save() creates Drupal user, CiviCRM contact ... but no uf_match

This forum was archived on 2017-11-26.