testing how extension attribs work under ad/ldap
[ga4php.git] / unittests / ldapbindtest.php
1 <?php 
2
3 // just trying to test how extensionAttributes work in AD. they seem to be exactly what we're looking for in terms of a place to plonk our data
4 $ds = ldap_connect("------", 389);
5 if($ds) {
6         $r = ldap_bind($ds, "-----", "-----");
7         if($r) {
8                 echo "r is r\n";
9         } else {
10                 echo "r is not r\n";
11         }
12         
13         //$sr = ldap_search($ds, "CN=administrator, CN=Users, ----", "objectclass=*");
14         
15         //if($sr) {
16 //              echo "sr is sr\n";
17         //}
18         
19         //$info = ldap_get_entries($ds, $sr);
20         $info["extensionattribute2"] = "-----";
21         
22         ldap_modify($ds, "CN=administrator, CN=Users, dc=safeneter, dc=int", $info);
23         
24         //print_r($info);
25 }
26
27 ?>