The current code tries to delete the entry from all the subdirectories without checking if the entry belongs to it.
For instance if you have a SQL not-readonly directory and a LDAP readonly directory, the deletion will fail with the following exception
WARNING: #{userManagementActions.deleteUser}: org.nuxeo.ecm.directory.DirectorySecurityException: Directory is read-only javax.faces.FacesException: #{userManagementActions.deleteUser}: org.nuxeo.ecm.directory.DirectorySecurityException: Directory is read-only ... Caused by: org.nuxeo.ecm.directory.DirectorySecurityException: Directory is read-only at org.nuxeo.ecm.directory.BaseSession.checkPermission(BaseSession.java:119) at org.nuxeo.ecm.directory.ldap.LDAPSession.deleteEntry(LDAPSession.java:476) at org.nuxeo.ecm.directory.multi.MultiDirectorySession.deleteEntry(MultiDirectorySession.java:557) at org.nuxeo.ecm.platform.usermanager.UserManagerImpl.deleteUser(UserManagerImpl.java:1381) at org.nuxeo.ecm.platform.usermanager.UserManagerImpl.deleteUser(UserManagerImpl.java:901) at org.nuxeo.ecm.platform.usermanager.UserManagerImpl.deleteUser(UserManagerImpl.java:907)
but the entry will be removed from the directory it belongs to.