Mapped profile fields are not updated when a user logs in. Looking at the code I see where the function ldap_integration_user_profile_load() loads the mappings:
$ldap_drupal_reverse_mappings = variable_get('ldap_drupal_reverse_mappings', array());
$ldap_drupal_mappings = array_flip($ldap_drupal_reverse_mappings);
... but this does not work. There is not a variable named 'dap_drupal_reverse_mappings'
I think that what you intended was this:
$ldap_drupal_reverse_mappings = _ldap_integration_reverse_mappings();
$ldap_drupal_mappings = array_flip($ldap_drupal_reverse_mappings);
... this is the way you do it in the function ldap_integration_user_load() and this seems to work fine for the profile fields.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | ldap_integration_user_profile_load.patch.txt | 1.18 KB | jsloan |
Comments
Comment #1
jsloan commentedI set the wrong version for the bug report.
This was for the code in Ldap_integration-4.7.0.tar.gz
Comment #2
jsloan commentedThis patch is a rewrite of the function ldap_integration_user_profile_load() It should be applied against the ldap_integration.module found in this package Ldap_integration-4.7.0.tar.gz
It includes the fix for the variable $ldap_drupal_reverse_mappings and it includes code to create a profile_value record if it does not already exist.
Comment #3
pablobm commentedFinally got time to address this. Thanks a lot for your help.
Comment #4
pablobm commentedI just released a new version with this fixed. I also discovered the INSERT or UPDATE thing had to be done on 4.6 as well. Thanks again for pointing out.
Comment #5
(not verified) commented