connection.connect(config.getString(IP), new Integer(config.getString(PORT)));
// Se autentica el usuario
connection.bind(LDAPConnection.LDAP_V3, config.getString(DOMAIN)+ DOUBLE_BAR + user, password);
LDAPSearchResults ldapSearchResults = connection.search("CN=Users,DC=" + config.getString(DOMAIN)+ ",DC=local", LDAPConnection.SCOPE_SUB, "(&(objectCategory=person)(objectClass=user))", null, Boolean.FALSE);
while (ldapSearchResults.hasMore()){
LDAPEntry ldapEntry = ldapSearchResults.next();
if (user.equals(getValue(ldapEntry, "sAMAccountName"))){
User searched = getUser(ldapEntry);