Hi,
I bought a plugin to add users directly from Active Directory. I want to be able to extract information from AD to osticket.
`
if (TRUE === ldap_bind($ldap_connection, $foo['bind_dn'], $pw)) {
$search_filter = '(&(objectCategory=person)(samaccountname=*)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))';
$attributes = array();
$attributes[] = 'displayname';
$attributes[] = 'mail';
$attributes[] = 'samaccountname';
$attributes[] = 'sn';
$attributes[] = 'telephonenumber';
$attributes[] = 'otherTelephone';
$attributes[] = 'department';
$attributes[] = 'title';
$attributes[] = 'employeeid';
$attributes[] = 'office';
// headers for import
$import = "email,name,phone,notes,department,employeeid,title,office\r\n";
$import .= $entries[$x]['mail'][0].','.$entries[$x]['displayname'][0].','.$entries[$x]['telephonenumber'][0].'X'.$entries[$x]['othertelephone'][0].','.$entries[$x]['department'][0].','.$entries[$x]['title'][0].','.$entries[$x]['employeeid'][0].','.$entries[$x]['office'][0].",\r\n";
// use the osTicket internal importer
$success = User::importCsv($import);`
This is the code I think I have to change, any advice will be appreciated.