Below is a piece of my code. This code is supposed to check to see if a user ID exists within LDAP. Unfortunatly, all is does is error out saying "Warning: LDAP: Unable to perform the search: No such object in /LDAP/step3.php on line ##." Does anyone have any suggestions on what can be done ? Am I going about this the wrong way ??
Help Please ....
$dn = "cn=$login, ou=$itype, ou=$loc, ou=$stype, o=fwisd";
$filter = "ObjectClass=User";
// Checking for Duplicate User ID's
if($read=ldap_search($ds, $dn, $filter))
{
while($dupchk=ldap_search($ds, $dn, $filter) )
{
$login = (String)$data[2];
$full = "$login$dupusr";
$dupusr = $dupusr + 1;
$login = $full;
$dn1 = "cn=$login, ou=$itype, ou=$loc, ou=$stype, o=fwisd";
if(!($fresult=ldap_read($ds, $dn1, $filter) == "FALSE")))
{
die("Nothing Found!");
}
}
}
Thank you for your help ....