Closed (fixed)
Project:
LDAP integration
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
24 Oct 2008 at 19:09 UTC
Updated:
4 Apr 2012 at 16:43 UTC
I have successfully configured ldap auth so I can login using active directory but I'm unable to pull the ldap displayName into a profile_full_name field on Drupal. Can I get some pointers on how this is done? I saw several posts about it but I didn't get the gist of how it was done. Thanks in advance.
Comments
Comment #1
miglius commentedYou need to enable and configure ldapdata module. The data for a user will be pulled on the first login of that user to drupal.
Comment #2
mullman commentedI have that setup and it isn't working. I'm using "Same, but read-only mode" and then mapping profile_full_name to displayName. When I log in with my active directory credentials and click My Account I find that the full name field is not populated. Did I miss something else? Thanks for the quick reply.
Comment #3
astreib commentedI have been experimenting with the ldap_integration modules and had a similar problem. My account was originally using drupal authentication, and I was able to switch to ldap authentication successfully and had the conflict setting to associate my drupal account with the ldap DN. That all worked fine but I could not get my directory attributes mapped to drupal profile: it would always show the druapl values.
So I dug through the code and found that the profile/attribute sync only happens if user_get_authmaps() indicates that the user was authenticated by ldapauth.
This should be, I thought... I dug into the ldapauth code and found that everything looked like it should be setting ldapauth as the authmap value. user_save() is called, and in the core users.module it will try to update the authmap table. However in my case I already had an entry in that table for 'webserver_auth', and it will not replace this with 'ldapauth', it just silently fails on a unique constraint violation on authname.
So, the quick fix is to go into mysql, delete from authmap where authname = 'my-login-name', logout and log in again, after that the profile/attribute sync works.
I think this might be a bug in the drupal core; I'm going to report it and see where it goes.
Comment #4
astreib commentedMy report and the reply(s) are here: http://drupal.org/node/905498
Comment #5
verta commentedFrom the reply
"The general way of doing this is to postfix the authname with @ldap"
- if there is a patch available, I can test it.
Comment #6
cgmonroe commentedClearing out old support requests... but I did try to duplicate this with the latest dev and couldn't. If this problem still exists please re-open.
Comment #7
cgmonroe commented