Commit 2f024857 authored by wannes's avatar wannes
Browse files

Fix bug where authentication would override main LDAP connection

parent 2509e0ab
......@@ -104,7 +104,7 @@ public class LDAP {
public boolean auth(String dn, String password) {
try {
connection = new LDAPConnection(socketFactory, host.get(), Integer.parseInt(Config.get("ldap/port", "636")));
LDAPConnection connection = new LDAPConnection(socketFactory, host.get(), Integer.parseInt(Config.get("ldap/port", "636")));
BindResult bind = connection.bind(dn, password);
boolean success = bind.getResultCode().equals(ResultCode.SUCCESS);
connection.close();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment