summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGunnar Wrobel <wrobel@pardus.de>2010-02-21 09:00:49 (GMT)
committerGunnar Wrobel <wrobel@pardus.de>2010-02-21 09:00:49 (GMT)
commit1a6768be7adab331e2149a808c431ab54daa035d (patch)
treed01bf690457ffdc248168d373526e4331ba58664 /lib
parentd7ab73f4a9a5afc41d985798c5fff3828f2c2cda (diff)
downloadkolab-webadmin-1a6768be7adab331e2149a808c431ab54daa035d.tar.gz
Provide an add method to the Ldap class and add unit testing for it.
The web admin uses ldap_add() directly in the views at the moment. This should later be refactored to use the add() method in the library.
Diffstat (limited to 'lib')
-rw-r--r--lib/KolabAdmin/Ldap.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/KolabAdmin/Ldap.php b/lib/KolabAdmin/Ldap.php
index a839458..cf4213f 100644
--- a/lib/KolabAdmin/Ldap.php
+++ b/lib/KolabAdmin/Ldap.php
@@ -176,6 +176,10 @@ class KolabLDAP {
return $ldap_object;
}
+ function add( $dn, $attr ) {
+ return ldap_add($this->connection, $dn, $attr);
+ }
+
function search( $base, $filter, $attrs = false ) {
$this->freeSearchResult();
if( $attrs ) {