Skip to content
Snippets Groups Projects
Commit 2a89ce61 authored by Adrian Damian's avatar Adrian Damian
Browse files

Small fix for numeric id - take 4

parent b986659f
No related branches found
No related tags found
No related merge requests found
...@@ -181,17 +181,17 @@ public abstract class LdapDAO ...@@ -181,17 +181,17 @@ public abstract class LdapDAO
{ {
if (p instanceof HttpPrincipal) if (p instanceof HttpPrincipal)
{ {
ldapField = "(uid=" + p.getName() + ")"; ldapField = "(&(objectclass=inetorgperson)(uid=" + p.getName() + "))";
break; break;
} }
if (p instanceof NumericPrincipal) if (p instanceof NumericPrincipal)
{ {
ldapField = "(numericid=" + p.getName() + ")"; ldapField = "(&(objectclass=cadcaccount)(numericid=" + p.getName() + "))";
break; break;
} }
if (p instanceof X500Principal) if (p instanceof X500Principal)
{ {
ldapField = "(distinguishedname=" + p.getName() + ")"; ldapField = "(&(objectclass=cadcaccount)(distinguishedname=" + p.getName() + "))";
break; break;
} }
if (p instanceof OpenIdPrincipal) if (p instanceof OpenIdPrincipal)
...@@ -208,9 +208,7 @@ public abstract class LdapDAO ...@@ -208,9 +208,7 @@ public abstract class LdapDAO
SearchResult searchResult = SearchResult searchResult =
getConnection().search(config.getUsersDN(), SearchScope.ONE, getConnection().search(config.getUsersDN(), SearchScope.ONE,
"(&(objectclass=cadcaccount)(objectclass=inetorgperson)" ldapField, "entrydn");
+ ldapField + ")",
"entrydn");
if (searchResult.getEntryCount() < 1) if (searchResult.getEntryCount() < 1)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment