See ChangeLog

Monotone-Parent: 2ff14c56a17684b19765d7bcced2675ab78095b7
Monotone-Revision: a638a09e849ae382ffe2e645259462cb8007bccd

Monotone-Author: ludovic@Sophos.ca
Monotone-Date: 2008-11-24T21:25:42
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Ludovic Marcotte
2008-11-24 21:25:42 +00:00
parent 57765e6911
commit b3e5fb6c92
4 changed files with 30 additions and 4 deletions
+11 -3
View File
@@ -293,18 +293,26 @@ static NSString *LDAPContactInfoAttribute = nil;
- (NSString *) _davFetchUsersMatching: (NSString *) user
{
LDAPUserManager *um;
NSEnumerator *users;
NSMutableString *fetch;
NSDictionary *currentUser;
NSString *field;
NSArray *users;
int i;
#warning the attributes returned here should match the one requested in the query
fetch = [NSMutableString string];
um = [LDAPUserManager sharedUserManager];
users = [[um fetchUsersMatching: user] objectEnumerator];
while ((currentUser = [users nextObject]))
// We sort our array - this is pretty useful for the
// SOGo Integrator extension, among other things.
users = [[[[um fetchUsersMatching: user] objectEnumerator] allObjects]
sortedArrayUsingSelector: @selector(caseInsensitiveDisplayNameCompare:)];
for (i = 0; i < [users count]; i++)
{
currentUser = [users objectAtIndex: i];
[fetch appendString: @"<user>"];
field = [currentUser objectForKey: @"c_uid"];
[fetch appendFormat: @"<id>%@</id>",