/** * Calls super method and {@link #deactivateUser(DirContext, LdapUser)} if the given user is deactivated. If the given * user is deleted, nothing will be done. * * @see org.projectforge.business.ldap.LdapDao#create(javax.naming.directory.DirContext, org.projectforge.business.ldap.LdapObject, * java.lang.Object[]) */ @Override public void create(final DirContext ctx, final String ouBase, final LdapUser user, final Object... args) throws NamingException { if (user.isDeleted() == true) { log.info( "Given LDAP user is deleted, so the user will not be created in the LDAP system (nothing will be done)."); return; } super.create(ctx, ouBase, user, args); if (user.isDeactivated() == true) { deactivateUser(ctx, user); } else if (user.isRestrictedUser() == true) { // Deactivated users shouldn't be moved to restricted ou sub context. setUserAsRestrictedUser(ctx, user); } }