<?php F3::call(':ldap_login'); $cn = "*"; $data = myldap_search("cn={$cn}"); echo "<b>cn={$cn} icin arama sonuclari ...</b> <br />"; for ($i = 0; $i < $data["count"]; $i++) { $cn = $data[$i]["cn"]; $sn = $data[$i]["sn"]; $telephonenumber = $data[$i]["telephonenumber"]; $postalcode = $data[$i]["postalcode"]; $userpassword = $data[$i]["userpassword"]; echo "CN = {$cn}, SN = {$sn}, TelephoneNumber = {$telephonenumber}, PostalCode = {$postalcode}, PASS = {$userpassword}"; echo "<br />"; } //ldap_close(F3::get('LDAP.conn')); ?>
function myldap_compare_password($cn, $password, $attr = "userPassword") { $ds = F3::get('LDAP.conn'); $dn = F3::get('LDAP.ou'); $attr = strtolower($attr); $data = myldap_search("cn={$cn}"); return ComparePassword($password, $data[0][$attr]); }
<?php // Retrieve matching record F3::call(':ldap_login'); $data = myldap_search('cn=' . F3::get('PARAMS.cn')); if ($data['count'] > 0) { $data = data4f3($data); // Populate REQUEST global with retrieved values F3::set('REQUEST', array_merge((array) F3::get('REQUEST'), $data)); // Render blog.htm template F3::set('pagetitle', 'Kullanıcıyı güncelle'); F3::set('template', 'kul'); F3::call('render'); } else { // Invalid blog entry; display our 404 page F3::http404(); }
function myldap_compare_password($ds, $dn, $cn, $password, $attr = "userPassword") { $attr = strtolower($attr); $data = myldap_search($ds, $dn, "cn={$cn}"); return ComparePassword($password, $data[0][$attr]); }
<?php require_once "inc/common.php"; require_once "inc/fun.php"; $ds = myldap_connect($ldaphost, $ldapport); $r = myldap_bind($ds, $ldapbdn, $ldappw); $cn = "*"; $data = myldap_search($ds, "ou=moodleusers," . $ldapdn, "cn={$cn}"); echo "<b>cn={$cn} icin arama sonuclari ...</b> <br />"; for ($i = 0; $i < $data["count"]; $i++) { $cn = $data[$i]["cn"]; $sn = $data[$i]["sn"]; $telephonenumber = $data[$i]["telephonenumber"]; $postalcode = $data[$i]["postalcode"]; $userpassword = $data[$i]["userpassword"]; echo "CN = {$cn}, SN = {$sn}, TelephoneNumber = {$telephonenumber}, PostalCode = {$postalcode}, PASS = {$userpassword}"; echo "<br />"; } ldap_close($ds); ?>