You are here

function _ldapdata_retrieve_profile_fields in LDAP integration 6

Same name and namespace in other branches
  1. 5.2 ldapdata.module \_ldapdata_retrieve_profile_fields()
  2. 5 ldapdata.module \_ldapdata_retrieve_profile_fields()

Retrieve profile fields.

Return value

An array of the form element.

3 calls to _ldapdata_retrieve_profile_fields()
ldapdata_admin_edit in ./ldapdata.admin.inc
Implements the LDAP server edit page.
_ldapdata_user_load in ./ldapdata.module
Implements hook_user() load operation.
_ldapdata_user_update_profile in ./ldapdata.module
Find out which profile attributes should be synced back to LDAP.

File

./ldapdata.module, line 713
ldapdata provides data maping against ldap server.

Code

function _ldapdata_retrieve_profile_fields() {
  $fields = array();
  if (module_exists('profile')) {
    $result = db_query("SELECT * FROM {profile_fields}");
    while ($row = db_fetch_object($result)) {
      $fields[$row->fid] = $row->name;
    }
  }
  return $fields;
}