You are here

function _ldapdata_reverse_mappings in LDAP integration 6

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

Retrieve reverse LDAP to drupal mappings.

Return value

An array of drupal keys pointing to LDAP attributes.

5 calls to _ldapdata_reverse_mappings()
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.
_ldapdata_user_update_drupal_account in ./ldapdata.module
Find out which Drupal attributes should be synced back to LDAP..
_ldapdata_user_update_profile in ./ldapdata.module
Find out which profile attributes should be synced back to LDAP.

File

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

Code

function _ldapdata_reverse_mappings($sid) {
  $map = array();
  foreach (_ldapdata_ldap_info($sid, 'ldapdata_mappings') as $key => $value) {
    if (($drupal_key = preg_replace('/^ldap_amap-(.*)$/', '$1', $key)) && !in_array($drupal_key, array(
      'access',
      'status',
    ))) {
      $map[$drupal_key] = $value;
    }
  }
  return $map;
}