function _ldapdata_retrieve_content_profile_fields in LDAP integration 6
Retrieve content profile fields.
Return value
An array with a field_name key and descriptive value.
3 calls to _ldapdata_retrieve_content_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_content_profile in ./
ldapdata.module - Find out which content profile attributes should be synced back to LDAP.
File
- ./
ldapdata.module, line 399 - ldapdata provides data maping against ldap server.
Code
function _ldapdata_retrieve_content_profile_fields() {
$fields = array();
if (module_exists('content_profile')) {
$cp_types = content_profile_get_types('types');
foreach ($cp_types as $type_obj) {
$type = $type_obj->type;
$all_fields = content_fields(NULL, $type);
if ($all_fields) {
foreach ($all_fields as $field_name => $field_attributes) {
// If it's not the type we are looking for, then skip the field.
if ($field_attributes['type_name'] != $type) {
continue;
}
$fields[$field_name] = "{$type}->{$field_name}";
}
}
}
}
return $fields;
}