1,6 → 1,7 |
package openldap.impl; |
|
|
import jomm.utils.DiacriticFilter; |
import netscape.ldap.LDAPConnection; |
import netscape.ldap.LDAPException; |
import openldap.ILdapManager; |
77,9 → 78,10 |
String DN= null; |
Statement stmt = con.createStatement(); |
//" + dnField + " |
ResultSet rs = stmt.executeQuery("SELECT " + dnField + " FROM " + baseQueries + " where " + userField + "=" + username); |
ResultSet rs = stmt.executeQuery("SELECT * FROM " + baseQueries + " where " + userField + "=" + username); |
//ResultSet rs = stmt.executeQuery("SELECT " + dnField + " FROM " + baseQueries + " where cn=" + username); |
if(rs.next()) { |
DN = rs.getString(dnField); |
DN = rs.getString("DN"); |
} |
stmt.close(); |
con.close(); |
101,7 → 103,7 |
} |
|
try { |
ld.authenticate(dn,password); |
ld.authenticate(DiacriticFilter.clean(dn),password); |
} catch ( LDAPException e ) { |
System.out.println(e.toString()); |
ld.disconnect(); |