Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | ldapsync-1865636-0.patch | 1.8 KB | pbosmans |
Comments
Comment #1
pbosmans CreditAttribution: pbosmans commentedI 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.
Comment #2
puddyglumThanks for the patch, it works very well!