mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-05 20:10:33 +00:00
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:
@@ -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>",
|
||||
|
||||
Reference in New Issue
Block a user