Since upgrading to 6.x-1.0-alpha2 the LDAP Data modules ignores the E-Mail field while syncing. I found out that in _ldapdata_user_load() line 220 the condition $drupal_field != 'mail' was added in alpha2.
I have to add that I use ldapdata as a standalone module without using LDAP authentication. Instead I'm logging in via CAS and have my own module that syncs the LDAP fields by invoking ldapdata_user_load(). This worked perfectly until the condition mentioned above was added.
Is it possible, to remove the condition again? I know the E-Mail is synchronized when the user authenticates via LDAP but I think my suggestion would give more flexibility. A duplicate sync can be avoided if you don't configure the E-Mail field in the LDAP Data configuration.
Comments
Comment #1
miglius commentedIt was a deliberate change to make sure that mail is synced earlier than in _ldapdata_user_load().
If you don't use ldapauth, you could invoke a function _ldapdata_user_login() before _ldapdata_user_load(). _ldapdata_user_login() syncs user's mail.
Comment #2
cgmonroe commentedMarking closed because as far as I can tell the latest code doesn't do this.