Hi ,
I need some help using ldap_modify.
I am having a text file containing employee information.
Now i would like to check if all the data are same in LDAP , if not need to modify information in Active Directory.
foreach($file as $line)
{
if(strstr($line,'INSERT INTO Userinfo VALUES'))
{
$input=parse_line($line);
$filter="(&(objectClass=user)(objectCategory=person)(mail=".$input['mail']."))";
$info=msearch($connect,$base_dn,$filter);
$keys=array_keys($input);
foreach($keys as $key)
{
foreach($info as $record)
{
if($record[$key][0] != input[$key])
{
$newdata=array();$newdata[$key][0]=$input[$key];
$update=ldap_modify($resource_dn,$record['distinguishedname'][0],$newdata); }
}
}
}
}
My input file is in $input and LDAP searched in AD is in $info.
Please help how i can check the keys and modify the info in AD.
Thanks
Rosy