This documentation relates to CiviCRM version 3.2. It's not maintained anymore.
Current version of documentation.

Profile APIs

Skip to end of metadata
Go to start of metadata

This page refers to outdated version of CiviCRM. Check current version of documentation.


Documentation Search


CiviCRM 3.2 Documentation

Support and Participation

Developer Resources


CiviCRM book!

Make sure to check out Understanding CiviCRM as well! You can also support this project by ordering a hard copy.

Profile and User Framework (CMS) APIs

civicrm_uf_profile_groups_get()

Availability: v2.1

Get all the profile (user framework) groups.

Parameters:

  • None.

Returns:

  • Reference of all groups(Array).
    Get UF Profile Groups
    Result

civicrm_uf_profile_title_get ( $id )

Availability: v2.1

Get the form title.

Parameters:

  • id(int) id of an uf_form

Returns:

  • Title(string) of the UF Group.
    Get UF Profile Title
    Result

civicrm_uf_profile_fields_get ( $id, $register = false, $action = null, $visibility = null )

Availability: v2.1
Note: This api's signature has changed since v1.4 r5255

Get all the fields that belong to the group with the named title.

Parameters:

  • id(int) The id of the UF group.
  • register(int) Are we interested in registration fields ?
  • action(int) What action are we doing ?
  • visibility(string) Visibility of fields we are interested in.

Returns:

  • Fields(Array) that belong to this title.
    Get UF Profile Fields
    Result

civicrm_uf_profile_html_get ( $userID, $title, $action = null, $register = false, $reset = false )

Availability: v2.1

Get and process the html for the form that represents this particular group.

Parameters:

  • userID(int) The user id that we are actually editing.
  • title(string) The title of the group we are interested in.
  • action(int) The action of the form.
  • register(boolean) Is this the registration form ?
  • reset(boolean) Should we reset the form ?

Returns:

  • The html for the form (string).
    Get UF Profile HTML
    Result

civicrm_uf_profile_html_by_id_get ( $userID, $profileID, $action = null, $register = false, $reset = false )

Availability: v2.1

Get and process the html for the form that represents this particular group (identified by id).

Parameters:

  • userID(int) The user id that we are actually editing.
  • profileID(int) The id of the group we are interested in.
  • action(int) The action of the form.
  • register(boolean) Is this the registration form ?
  • reset(boolean) Should we reset the form ?

Returns:

  • The html for the form (string).
    Get UF Profile HTML By ID
    Result

civicrm_uf_create_html_get ( $gid, $reset = false )

Availability: v2.1

Get the html for the form for profile creation.

Parameters:

  • gid(int) ufGroup ID
  • reset(boolean) Should we reset the form?

Returns:

  • The html for the form (string).
    Fetch Profile HTML
    Result

civicrm_uf_match_id_get ( $ufID )

Availability: v2.1

Retrieve the CiviCRM Contact ID for a given Drupal or Joomla User ID.

Parameters:

  • ufID(int) - Drupal or Joomla User ID

Returns:

  • contact_id(int) - civicrm_contact.id
    Fetch UF Match ID
    Result

civicrm_uf_id_get ( $contactID )

Retrieve the Drupal or Joomla User ID corresponding to a given CiviCRM Contact ID.

Note: CiviCRM contacts are NOT required to have a matched/linked CMS user record. In these cases, this function will return NULL.

Availability: v2.1 (In prior versions this was known as crm_uf_get_uf_id($contactID) )

Get the uf_id given a contact_id

Parameters:

  • contactID(int) - civicrm_contact.id

Returns:

  • ufID(int) - Drupal or Joomla User ID
    Fetch UF Id
    Fetch UF ID

civicrm_uf_group_create ( $params )

Availability: v2.1

Parameters:

  • params(array) Associative array of property name/value pairs to insert in group.

Returns:

  • Newly created uf_group array.
    UF Group Create
    Result

civicrm_uf_group_update ( $params ,$ufGroup)

Availability: v2.1

Parameters:

  • params(array) Associative array of property name/value pairs to insert in group.
  • ufGroup(int) A valid UF Group id that to be updated.

Returns:

  • Newly created uf_group array.
    UF Group Create
    Result

civicrm_uf_field_create ( $UFGroup , $params )

Availability: v2.1

Defines 'uf field' within a group.

Parameters:

  • UFGroup(int) Valid uf_group id
  • params(array) Associative array of property name/value pairs to create new uf field.

Returns:

  • Newly created uf_field array.
    UF Field Create
    Result

civicrm_uf_field_update ( $params , $ufField)

Availability: v2.1

Parameters:

  • $params(array) Associative array of property name/value pairs to update in field.
  • $ufField(int) A valid uf field id that to be updated.

Returns:

  • Updated uf_field array.
    UF Field Update
    Result

civicrm_uf_join_edit ( $params )

Availability: v2.1

Use this API to create / edit uf_join records.

Parameters:

  • $params(array) Associative array of property name/value pairs to update/add.

Returns:

  • CRM_Core_DAO_UFJoin array.
    UF Join Edit / Create
    Result

civicrm_uf_join_id_find ( $params )

Availability: v2.1

Use this API to get the enrty-id of uf_join record.

Parameters:

  • $params(array) Associative array of property name/value pairs of uf_join record for the required id.

Returns:

  • int, if id found.
  • null, if id not found.

Find UF Join ID
Result

civicrm_uf_join_UFGroupId_find( $params )

Availability: v2.1

Use this API to get the uf_group_id.

Parameters:

  • $params(array) Associative array of property name/value pairs of uf_join record.

Returns:

  • int, if uf_group_id found.
  • null, if uf_group_id not found.
    Find UF GroupId
    Result

civicrm_profile_html_validate( $userID, $title, $action=null, $register=false )

Availability: v2.1

Use this API to check the data validity.

Parameters:

  • $userID(int) The user id.
  • $title(string) The title of the group.
  • $action Action of the form.
  • $register(boolean) Registration form

Returns:

  • error, if validation-error found.
  • true, if no error.
    Profile HTML Validation
    Result
Labels
  • None

Creative Commons License
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-Share Alike 3.0 United States Licence.