3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
13 * This api exposes CiviCRM user framework match.
15 * @package CiviCRM_APIv3
19 * Get the contact_id given a uf_id or vice versa.
21 * @param array $params
25 function civicrm_api3_uf_match_get($params) {
26 return _civicrm_api3_basic_get('CRM_Core_BAO_UFMatch', $params);
30 * Create or update a UF Match record.
32 * @param array $params
33 * Array per getfields metadata.
38 function civicrm_api3_uf_match_create($params) {
39 return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__
), $params, 'UFMatch');
43 * Adjust Metadata for Create action.
45 * The metadata is used for setting defaults, documentation & validation.
47 * @param array $params
48 * Array of parameters determined by getfields.
50 function _civicrm_api3_uf_match_create_spec(&$params) {
51 $params['contact_id']['api.required'] = 1;
52 $params['uf_id']['api.required'] = 1;
53 $params['uf_name']['api.required'] = 1;
57 * Delete a UF Match record.
59 * @param array $params
64 function civicrm_api3_uf_match_delete($params) {
65 return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__
), $params);