- if (!ud.isDisabled())
- res.add(ud);
- }
-// Object principal = ud.getProperties().get(Context.SECURITY_PRINCIPAL);
-// if (principal != null) {
-// try {
-// LdapName principalLdapName = new LdapName(principal.toString());
-// if (principalLdapName.equals(name))
-// res.add(ud);
-// } catch (InvalidNameException e) {
-// // silent
+ if (userDirectory.isDisabled())
+ continue userDirectories;
+// if (res.isEmpty()) {
+ res.add(userDirectory);
+// } else {
+// for (AbstractUserDirectory ud : res) {
+// LdapName bd = ud.getBaseDn();
+// if (userDirectory.getBaseDn().startsWith(bd)) {
+// // child user directory
+// }
+// }