Hi, I'm needing some assistance displaying ldap data in user profiles.

I've successfully configured ldap authentication with Active Directory.

Next, I created 4 user profile fields for fname, lname, location and telephone. I created a category in profile module called "Directory Data" for these.

In addition, I added those to the array in ldapdata.conf.php

$GLOBALS['ldap_attributes'] = array(
  'sn'            => array('text', 'textfield', t('Last Name'), 64, 64),
  'givenName'     => array('text', 'textfield', t('First Name'), 64, 64),
  'mail'          => array('text', 'textfield', t('Email'), 64, 64),
  'telephoneNumber' => array('text', 'textfield', t('Telephone'), 64, 64),
  'physicalDeliveryOfficeName' => array('text', 'textfield', t('Location'), 64, 64),
);

Now, when I login as an AD user, I can see on the "My Account" page a section for "LDAP Attributes" which is empty, even though there is data in LDAP. When I click on "Edit" my account, I see a tab for "Directory Info" with those fields, also empty.

What did I do wrong? Any help would be appreciated.

Comments

scafmac’s picture

Status: Active » Closed (duplicate)

You don't need to hard code the mapping in the file. Use http://drupal.org/node/213656#comment-709805 for more information. Depending on the version of ldap integration you're using, make sure to comment out the filter function (mentioned in the referenced node) which is probably your problem. I believe you can do the mapping in the file as you've done, but you'll see on the other issue, you don't need to.

This is essentially a dup so I'm closing it. Comment on the other issue if you have more questions.

Thanks