- Profile and User Framework (CMS) APIs
- civicrm_uf_profile_groups_get()
- civicrm_uf_profile_title_get ( $id )
- civicrm_uf_profile_fields_get ( $id, $register = false, $action = null, $visibility = null )
- civicrm_uf_profile_html_get ( $userID, $title, $action = null, $register = false, $reset = false )
- civicrm_uf_profile_html_by_id_get ( $userID, $profileID, $action = null, $register = false, $reset = false )
- civicrm_uf_create_html_get ( $gid, $reset = false )
- civicrm_uf_match_id_get ( $ufID )
- civicrm_uf_id_get ( $contactID )
- civicrm_uf_group_create ( $params )
- civicrm_uf_group_update ( $params ,$ufGroup)
- civicrm_uf_field_create ( $UFGroup , $params )
- civicrm_uf_field_update ( $params , $ufField)
- civicrm_uf_join_edit ( $params )
- civicrm_uf_join_id_find ( $params )
- civicrm_uf_join_UFGroupId_find( $params )
- civicrm_profile_html_validate( $userID, $title, $action=null, $register=false )
Profile and User Framework (CMS) APIs
civicrm_uf_profile_groups_get()
Availability: v2.1
Get all the profile (user framework) groups.
Parameters:
Returns:
- Reference of all groups(Array).
civicrm_uf_profile_title_get ( $id )
Availability: v2.1
Get the form title.
Parameters:
Returns:
- Title(string) of the UF Group.
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.
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).
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).
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).
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
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
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.
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.
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.
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:
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.
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.
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.
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.