function _ldapdata_reverse_mappings in LDAP integration 5.2
Same name and namespace in other branches
- 5 ldapdata.module \_ldapdata_reverse_mappings()
- 6 ldapdata.module \_ldapdata_reverse_mappings()
6 calls to _ldapdata_reverse_mappings()
File
- ./
ldapdata.module, line 789
Code
function _ldapdata_reverse_mappings($config) {
$ret = array();
$result = db_fetch_array(db_query("SELECT ldapdata_mappings FROM {ldapauth} WHERE name = '%s'", $config));
$mappings = unserialize($result['ldapdata_mappings']);
foreach ($mappings as $key => $value) {
$drupal_key = preg_replace('/^ldap_amap-(.*)$/', '$1', $key);
$ldap_attr = $value;
if ($drupal_key && $ldap_attr) {
$ret[$drupal_key] = $ldap_attr;
}
}
return $ret;
}