Example #1
0
<?php

require_once "inc/common.php";
require_once "inc/fun.php";
require "search.php";
$ds = myldap_connect($ldaphost, $ldapport);
$r = myldap_bind($ds, $ldapbdn, $ldappw);
$cn = "mahmut";
$password = "******";
echo "<hr /><b>cn = {$cn} kullanicisi icin password = {$password} karsilastiriliyor ...</b><br />";
$r = myldap_compare_password($ds, "ou=moodleusers,{$ldapdn}", $cn, $password);
echo "sonuc = {$r}";
echo "<hr />Dizinlerin guncel hali...<br />";
require "search.php";
@ldap_close($ds);
?>

Example #2
0
<?php

F3::call(":ldap_search");
$cn = "mahmut";
$password = "******";
echo "<hr /><b>cn = {$cn} kullanicisi icin password = {$password} karsilastiriliyor ...</b><br />";
$r = myldap_compare_password($cn, $password);
echo $r == 0 ? "Basarili" : "Basarisiz";
echo "<hr />";
$cn = "mahmut";
$password = "******";
echo "<hr /><b>cn = {$cn} kullanicisi icin password = {$password} karsilastiriliyor ...</b><br />";
$r = myldap_compare_password($cn, $password);
echo $r == 0 ? "Basarili" : "Basarisiz";
echo "<hr />Dizinlerin guncel hali...<br />";
F3::call(":ldap_search");
ldap_close(F3::get('LDAP.conn'));