Delete a user
If the native LDAP entry is a member of another IBM ISAM domain, or another application has placed child entries beneath it, the removal of the native LDAP entry fails. An exception is thrown from the API but the ISAM component is still removed.
The following example deletes the ISAM user testuser from the Default ISAM domain and removes the native LDAP entry. Last parameter of deleteUser() is set to true.
String userId = “testuser”; try { rgyRegistry.deleteUser(“Default”, userId, true); }catch (WarningNativeEntityInUseRgyException e) { System.out.println(“Warning: unable to remove native LDAP entry”); // Ignore }catch (RgyException e) { e.printStackTrace(); System.exit(1); }
Parent topic: Groups