Skip to content

Commit

Permalink
(fix) also use the filter when doing DN lookups (fixes #2253)
Browse files Browse the repository at this point in the history
  • Loading branch information
extrafu committed Dec 22, 2016
1 parent 8c075d2 commit 94fc5d1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions SoObjects/SOGo/LDAPSource.m
Expand Up @@ -1305,12 +1305,19 @@ - (NSString *) lookupLoginByDN: (NSString *) theDN
{
NGLdapConnection *ldapConnection;
NGLdapEntry *entry;
EOQualifier *qualifier;
NSString *login;

login = nil;
qualifier = nil;

ldapConnection = [self _ldapConnection];

if (_filter)
qualifier = [EOQualifier qualifierWithQualifierFormat: _filter];

entry = [ldapConnection entryAtDN: theDN
qualifier: qualifier
attributes: [NSArray arrayWithObject: UIDField]];
if (entry)
login = [[entry attributeWithName: UIDField] stringValueAtIndex: 0];
Expand Down

0 comments on commit 94fc5d1

Please sign in to comment.