You are here

function LDAPInterface::retrieveMultiAttribute in LDAP integration 5

Same name and namespace in other branches
  1. 5.2 ldap_integration/LDAPInterface.php \LDAPInterface::retrieveMultiAttribute()
  2. 6 includes/LDAPInterface.inc \LDAPInterface::retrieveMultiAttribute()

File

ldap_integration/LDAPInterface.php, line 193

Class

LDAPInterface

Code

function retrieveMultiAttribute($dn, $attrname) {
  $entries = $this
    ->retrieveAttributes($dn);
  $result = array();
  $retrieved = $entries[strtolower($attrname)];
  $retrieved = $retrieved ? $retrieved : array();
  foreach ($retrieved as $key => $value) {
    if ($key !== 'count') {
      $result[] = $value;
    }
  }
  return $result;
}