When testing query in "LDAP Query Module" the result does not contain some fields from users AD profiles. For example: facsimiletelephonenumber, ipphone, mobile. These fields are present in AD and filled with some data. But there is one thing - when I perform a test from LDAP Servers page (to test connection to AD from service account) I can see that fields and it's tokens - [ipphone], [mobile] and etc.

Why LDAP Query can not get that fields?

Comments

johnbarclay’s picture

Version: 7.x-2.0-beta5 » 7.x-2.x-dev
Category: Bug report » Support request
Priority: Major » Normal
Issue summary: View changes
johnbarclay’s picture

Perhaps the service account doesn't have access to them. Perhaps they need to be specified to be returned. I'm moving this down to minor support request until someone can find the bug.

VladB1989’s picture

Category: Support request » Bug report

In order to populate the table headers, the module checks only the attributes in the first item returned by the ldap query: please check ldap_query.theme.inc:

//in function theme_ldap_query_results($variables)
if (isset($results[0]) && $results[0] || $results['directreports']) { // searching on all attributes
    foreach ($results[0] as $k => $v) {
      if (is_numeric($k)) {
        $attributes_display[] = $v;
      }
    }
  }

The problem is the first entry does not have the specific fields so the table will not have those items at all.

grahl’s picture

Title: LDAP Query test doesn't return nested AD fields » LDAP Query only returns fields present in first entry
Version: 7.x-2.x-dev » 8.x-3.x-dev
grahl’s picture

Priority: Normal » Minor
Status: Active » Postponed

This was fixed in 8.x-3.x in availableFields() of QueryController.

Patches with a backport are welcome.

grahl’s picture

Version: 8.x-3.x-dev » 7.x-2.x-dev
grahl’s picture

Status: Postponed » Closed (outdated)

Closing issue as outdated due to no further development on 7.x, if you feel this issue is still relevant and you are willing to work on a patch and/or debug the problem, please reopen.