ldap_modify及错误
时间:2006-04-13 来源:才郎三号
this is my code
";
echo "Username = ".$uid."
";
echo "User login ID = ".$userbindDN."
";
echo "User DN = $userDn
";
$result = ldap_mod_replace($ldap, $userDn , $userdata);
if($result)
{
echo "User modified!
" ;
}else{
echo "There was a problem!
";
echo ldap_error($ldap)."
";
}
/** Now try to bind with the username and new password to insure change**/
echo "Now testing new password to insure change
";
ldap_bind($ldap, $userbindDN, $passwd1);
if (ldap_errno($ldap) !== 0)
{
exit('ERROR: User ID/Password Invalid - '.ldap_error($ldap));
}else{
echo "Password Verified OK. Password change complete
";
}
}
?>
相关阅读 更多 +