I use the core profile module to set 2 extra attributes : Firstname en Lastname.
I map these profile attributes with our LDAP attributes 'givenname' and 'sn'.
These mapping works correct when a user logs in.

I want to use the ldap synchronisation module to update these profile attributes.
But that doesn't seems to work. Is this a normal behavior ?

My LDAP sync is running correctly, here my log-message :
Completed LDAP sync. LDAP users found: 1446. Existing users updated: 417. New users created: 0. LDAP-authentified users that do not have an enabled LDAP account: 324.

CommentFileSizeAuthor
#1 ldapsync-1865636-0.patch1.8 KBpbosmans
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pbosmans’s picture

Category: support » bug
Status: Active » Needs review
FileSize
1.8 KB

I noticed some strange behavior about the syncing of profile fields.

Within the ldapsync.module on line 355 the function '_ldapdata_user_load' use the parameter $ldap_users which is not defined in the function.
The only place where $ldap_users is define is on line 82 with the function '_ldap_search'. This function calls the function '_ldapsync_process_entry' which on his turns call the '_ldapdata_user_load' function which uses the result of the return value of '_ldap_search'.
This is one issue why the syncing of profile fields doesn't work. The other issue is within the ldapdata.module.

I created a patch that will do the job correctly and now ldapsync will update my profile fields with the corresponding ldap-attributes.

puddyglum’s picture

Thanks for the patch, it works very well!