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) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • How to extend matching logic
Pages: [1]

Author Topic: How to extend matching logic  (Read 1088 times)

kathkeating

  • I’m new here
  • *
  • Posts: 10
  • Karma: 0
  • CiviCRM version: 4.0.4
  • CMS version: Joomla 1.6.1 +
  • MySQL version: 5
  • PHP version: 5
How to extend matching logic
August 16, 2011, 04:14:28 pm
I'm at a loss to figure out how to extend the matching logic. None of the defined Hooks seem appropriate or I'm missing something.  The docs I found define the existing match logic as:

Code: [Select]
The (CMS) user is linked to an EXISTING (CiviCRM) contact record based on email address.
Instead of a simple "email address" match, I want a more granular match based on First Name, Last Name and Email Address.

Does anyone have any pointers on where I would go to make this extension to CiviCRM? Thanks!

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: How to extend matching logic
August 16, 2011, 05:19:07 pm

I checked the code and then i went back several versions (to 1.5 and 1.9) to see if it was ever there and it did not show up :( My guess is, we documented it and were waiting for a patch which never came in

where do u want his granular match? during user registration or login?

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

kathkeating

  • I’m new here
  • *
  • Posts: 10
  • Karma: 0
  • CiviCRM version: 4.0.4
  • CMS version: Joomla 1.6.1 +
  • MySQL version: 5
  • PHP version: 5
Re: How to extend matching logic
August 16, 2011, 05:59:37 pm
I want this at user registration.

I've finally decided to write my own custom code to handle this.  After a new User Registration is saved (in Joomla) I'm simply looking to see if a match was created. If it was, I update the civicrm_uf_match record with the correct match.  Otherwise, if no match is found (which seems to be way too often), I'm adding a match record.

I have no idea if this is going to work, but we'll see. Since UFMATCH isn't implemented through the civicrm_api() yet for Create/Update, I'm having to update the database directly.

It's a round-about way, but I'm hoping it will work.


xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: How to extend matching logic
August 17, 2011, 01:30:59 am
Hi,

I would strongly suggest to contribute the missing apis, as it is a matter of adding a function in api/v3/UFMatch.php

And to use the BAO/DAO instead of going sql directly.

Genuine question: what make you think it's easier to go the custom road instead of contributing to the API?
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • How to extend matching logic

This forum was archived on 2017-11-26.