Wednesday, September 2, 2009

delete user from LDAP

public boolean deleteUser(LDAPConnection ld, String ou, String username) throws LDAPException {
String dn = String.valueOf(String.valueOf((new StringBuffer("uid=")).append(username).append(", ou=").append(ou).append(", o=").append(organization)));
ld.delete(dn);
System.out.println("Entry deleted");
return true;
}

No comments: