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) »
  • I Get "Undefined Function crm_uf_get_match_id()" After Upgrade from 1.9 to 2.0
Pages: [1]

Author Topic: I Get "Undefined Function crm_uf_get_match_id()" After Upgrade from 1.9 to 2.0  (Read 1052 times)

farmrchrys

  • I post occasionally
  • **
  • Posts: 92
  • Karma: 2
    • Spokane Moves to Amend the Constitution (under development)
  • CiviCRM version: CiviCRM 4.4.6
  • CMS version: Drupal 7.31
  • MySQL version: MySQL 5.5.37
  • PHP version: PHP 5.3.28
I Get "Undefined Function crm_uf_get_match_id()" After Upgrade from 1.9 to 2.0
October 29, 2008, 11:24:54 pm
Hi All,

I made the upgrade from 1.9 to 2.0. Most things seem to be working okay.

 I ran into the message "Fatal error: Call to undefined function crm_uf_get_match_id() in var/www/includes/common.inc(1355) : eval()'d code on line 9"

because a php script I wrote, that used to work, looks like this:

Code: [Select]
Global $user;
    if ($user->uid < 1){
    drupal_goto ($path='node/318');
exit();
}
    elseif ($user->uid >= 1);{
    $userID = crm_uf_get_match_id($user->uid);
} ...and then something else happens...

I've read some posts that said something about fixing the api for 2.0, etc. but what I'd really like is for someone to tell me what I need to change in my snippet to get the crm contact ID from the Drupal user ID. It should be a simple fix, right?

Thanks.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: I Get "Undefined Function crm_uf_get_match_id()" After Upgrade from 1.9 to 2.0
October 30, 2008, 08:48:57 am
Check this doc for info on initializing / using api's in v2.0 + :

http://wiki.civicrm.org/confluence/display/CRMDOC/Changes+in+CiviCRM+2

I suspect you may just need to add the require_once statement:

require_once('api/UFGroup.php');
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • I Get "Undefined Function crm_uf_get_match_id()" After Upgrade from 1.9 to 2.0

This forum was archived on 2017-11-26.