You are here

function _sf_prematch_get_user_schema in Salesforce Suite 6.2

Same name and namespace in other branches
  1. 7.2 sf_prematch/sf_prematch.main.inc \_sf_prematch_get_user_schema()

Returns an array of the profile fields formatted like Drupal's schema

1 call to _sf_prematch_get_user_schema()
sf_prematch_import in sf_prematch/sf_prematch.main.inc
Use prematch rule to find a drupal node to match the SF object.

File

sf_prematch/sf_prematch.main.inc, line 315
Import/Export functions for sf_prematch module.

Code

function _sf_prematch_get_user_schema() {
  $schema = array();
  if (module_exists('profile')) {
    $results = db_query("SELECT name, fid FROM {profile_fields}");
    while ($result = db_fetch_array($results)) {
      $schema['fields'][$result['name']] = $result['fid'];
    }
  }
  return $schema;
}