From: paulr Date: Tue, 23 Nov 2010 04:34:02 +0000 (+1100) Subject: Active directory examples. X-Git-Url: http://git.pjr.cc/?a=commitdiff_plain;h=a492905529352ba1c6f7bf675f53e8498745c9bf;p=ga4php.git Active directory examples. --- diff --git a/example/activedirectory/index.php b/example/activedirectory/index.php new file mode 100644 index 0000000..e0d5ea2 --- /dev/null +++ b/example/activedirectory/index.php @@ -0,0 +1,19 @@ + \ No newline at end of file diff --git a/unittests/ldapbindtest.php b/unittests/ldapbindtest.php index 24cf62d..d58e311 100644 --- a/unittests/ldapbindtest.php +++ b/unittests/ldapbindtest.php @@ -1,27 +1,49 @@ $val) { + //echo "$key is ".$val["distinguishedname"][0]."\n"; + if($val["distinguishedname"][0] != "") { + $user[$i]["dn"] = $val["distinguishedname"][0]; + $user[$i]["acn"] = $val["samaccountname"][0]; + } + + $i ++; + //return 0; + } + + foreach($user as $value) { + $cn = $value["dn"]; + $sr2 = ldap_search($ds, "$cn", "objectclass=*"); + $info = ldap_get_entries($ds, $sr2); + print_r($info); + return 0; + } + + print_r($user); + } ?> \ No newline at end of file