index c7edf194ca907c2fc3d688fb3f49ec2215f4c64e..a589e67ebf545e36c416e466643668fee41de6dc 100644 (file)
$ldap->modify($this->attrs);
}else{
/* Write FAIscript to ldap*/
- $ldap->cd($this->dn);
- $ldap->create_missing_trees($this->dn);
+ $ldap->cd(preg_replace('/^[^,]+,[^,]+,/', '', $this->dn));
+ $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn));
$ldap->cd($this->dn);
$ldap->add($this->attrs);
}
$ldap->modify($tmp);
$this->handle_post_events("modify");
}elseif($obj['status']=="new"){
- $ldap->cd($sub_dn);
- $ldap->create_missing_trees($sub_dn);
+ $ldap->cd(preg_replace('/^[^,]+,[^,]+,/', '', $sub_dn));
+ $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $sub_dn));
$ldap->cd($sub_dn);
$ldap->add($tmp);
$this->handle_post_events("add");