5 Replies Latest reply on May 10, 2013 1:58 PM by WolfShade

    CF9 - convert LDAP data into associative array?

    WolfShade Level 4

      Hello, everyone.


      Does anyone have any suggestions on a good way to convert LDAP data into an associative array with the key being the fieldname?


      For example:

      dn: CN=First Last, OU=Dept A, OU=Dept B, OU=Domain Users,DC=hq,DC=domainname,DC=com
      changetype: edit
      sn: Last
      description: Dept C
      telephoneNumber: xxx-xxx-xxxx
      givenName: First
      empID: ab1234x
      mail: Last.First@domainname.com


      There are several thousand similar to the above; some will have three lines of data, some as many as twelve, each individual separated by double line breaks (<br />).  I need to make an array where "dn", "changetype", "sn", etc., are the keys with the text after the colon as the value.


      What is the best way to do this?


      Thank you,