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.

Comments

jsloan’s picture

Title: ldap_integration_user_profile_load() » - update -
Version: 4.6.x-1.x-dev » master

I set the wrong version for the bug report.
This was for the code in Ldap_integration-4.7.0.tar.gz

jsloan’s picture

Title: - update - » LDAP integration for 4.7.0
StatusFileSize
new1.18 KB

This 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

// $Id: ldap_integration.module,v 1.2.2.4.2.15 2005-12-13 20:30:27 pablobm Exp $

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.

pablobm’s picture

Assigned: Unassigned » pablobm
Status: Active » Reviewed & tested by the community

Finally got time to address this. Thanks a lot for your help.

pablobm’s picture

Title: LDAP integration for 4.7.0 » Integration with profile module not working on 4.7.0
Status: Reviewed & tested by the community » Fixed

I 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.

Anonymous’s picture

Status: Fixed » Closed (fixed)