LDAP_ENABLE_AUTO option is installed, and custom fields are not updated when the new user logs in. The default field are updated.

Document ID : KB000026831
Last Modified Date : 14/02/2018
Show Technical Document Details

PROBLEM:

The customized field ldap_test has been added to the Contact object and mapped to an existing LDAP attribute:

      OBJECT cnt                                    
      {                                             
              ATTRIBUTES usp_contact SECONDARY      
              {                                     
                      string1 c_nx_string1 STRING ; 
                      zldap_test STRING ;           
              } ;                                   
      } ;                                           
                                                    
      OBJECT ldap LDAP { 
              string1 pzLastName STRING ;   
              zldap_test pzLastName STRING ;
             };
      };

When a new user logs in, the Contact record is automatically created, but the new custom field doesn't contain any data:

C:\Documents and Settings\Administrator>pdm_extract -f "SELECT id,
zldap_test, c_nx_string1 FROM usp_contact WHERE                   
id=U'5AD80167F8383744A3350E778B2DB43D'"
TABLE usp_contact          
        id zldap_test c_nx_string1                            
{ "5AD80167F8383744A3350E778B2DB43D" ,"Smith" ,"" }

RESOLUTION:

When mapping fields onto LDAP attributes in this manner, there is a restriction that each LDAP attribute can only be mapped to a single field. In the above example the LDAP attribute "pzLastName" is mapped to two different fields in the contact record. Only the first field is filled in automatically. If the second field is mapped to a different LDAP attribute, then both fields will work:

OBJECT ldap LDAP {                            
       ATTRIBUTES LDAP_Entry{                 
                string1 pzFirstName STRING;   
                zldap_test pzLastName STRING ;
       };                                     
};                                            
After the new user logs in, both fields have been populated from LDAP:
C:\> pdm_extract -f "select id from ca_contact where last_name='Smith'" TABLE ca_contact id { "332A10319AFD3E42B72646043D8D4F64" }
C:\> pdm_extract -f "SELECT id, c_nx_string1, zldap_test FROM usp_contact WHERE id=U'332A10319AFD3E42B72646043D8D4F64'" TABLE usp_contact id c_nx_string1 zldap_test {"332A10319AFD3E42B72646043D8D4F64" ,"John" ,"Smith" }