fix(users): try to always use the user domain in the basDN with %d

This commit is contained in:
Hivert Quentin
2024-11-20 15:44:34 +01:00
parent c8b0c3321e
commit 6a4d03b35f
2 changed files with 6 additions and 4 deletions
+5 -2
View File
@@ -1435,15 +1435,18 @@ groupObjectClasses: (NSArray *) newGroupObjectClasses
contacts = [NSMutableArray array];
NSLog(@"fetchContactsMatching: baseDN was %@", _baseDN);
if(theDomain != nil && [theDomain length] > 0)
{
if ([_baseDN rangeOfString: @"%d"].location != NSNotFound)
NSLog(@"fetchContactsMatching: the domain is %@", theDomain);
if ([_pristineBaseDN rangeOfString: @"%d"].location != NSNotFound)
{
s = [NSMutableString stringWithString: _baseDN];
s = [NSMutableString stringWithString: _pristineBaseDN];
[s replaceOccurrencesOfString: @"%d" withString: theDomain options: 0 range: NSMakeRange(0, [s length])];
ASSIGN(_baseDN, s);
}
}
NSLog(@"fetchContactsMatching: baseDN is now %@", _baseDN);
if ([match length] > 0 || !_listRequiresDot)
{
+1 -2
View File
@@ -1359,8 +1359,7 @@ static const NSString *kObfuscatedSecondaryEmailKey = @"obfuscatedSecondaryEmail
- (NSArray *) fetchContactsMatching: (NSString *) filter
inDomain: (NSString *) domain
{
return [self
_fetchEntriesInSources: [self addressBookSourceIDsInDomain: domain]
return [self _fetchEntriesInSources: [self addressBookSourceIDsInDomain: domain]
matching: filter
inDomain: domain];
}