array( "top", "organization"), "o" => "test", )); ldap_add($link, "cn=userA,$base", array( "objectclass" => "person", "cn" => "userA", "sn" => "testSN1", "userPassword" => "oops", "telephoneNumber" => "xx-xx-xx-xx-xx", "description" => "user A", )); ldap_add($link, "cn=userB,$base", array( "objectclass" => "person", "cn" => "userB", "sn" => "testSN2", "userPassword" => "oopsIDitItAgain", "description" => "user B", )); ldap_add($link, "cn=userC,cn=userB,$base", array( "objectclass" => "person", "cn" => "userC", "sn" => "testSN3", "userPassword" => "0r1g1na1 passw0rd", )); } function remove_dummy_data($link, $base) { ldap_delete($link, "cn=userC,cn=userB,$base"); ldap_delete($link, "cn=userA,$base"); ldap_delete($link, "cn=userB,$base"); ldap_delete($link, "o=test,$base"); } ?>