Monotone-Parent: c00d2fadae3d5733fb53c91e14b43a56d1e1ca58

Monotone-Revision: b8d56bd5a31be825cfe66b8fe9f9a15269a09fbc

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2009-06-11T22:13:10
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2009-06-11 22:13:10 +00:00
parent 5643fd2f3f
commit 6b61cd8701
2 changed files with 24 additions and 19 deletions
+3
View File
@@ -1,5 +1,8 @@
2009-06-11 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/SOGo/SOGoUserFolder.m (-davUserQuery:): do not return
the user information for the current user.
* UI/MainUI/SOGoUserHomePage.m (-usersSearchAction): do not return
the user information for the current user.
(-foldersSearchAction): the method only search folders for the
+21 -19
View File
@@ -382,13 +382,14 @@ static NSString *LDAPContactInfoAttribute = nil;
LDAPUserManager *um;
NSMutableString *fetch;
NSDictionary *currentUser;
NSString *field;
NSString *field, *login;
NSArray *users;
int i;
#warning the attributes returned here should match the one requested in the query
fetch = [NSMutableString string];
login = [[context activeUser] login];
um = [LDAPUserManager sharedUserManager];
// We sort our array - this is pretty useful for the
@@ -398,25 +399,26 @@ static NSString *LDAPContactInfoAttribute = nil;
for (i = 0; i < [users count]; i++)
{
currentUser = [users objectAtIndex: i];
[fetch appendString: @"<user>"];
field = [currentUser objectForKey: @"c_uid"];
[fetch appendFormat: @"<id>%@</id>",
[field stringByEscapingXMLString]];
field = [currentUser objectForKey: @"cn"];
[fetch appendFormat: @"<displayName>%@</displayName>",
[field stringByEscapingXMLString]];
field = [currentUser objectForKey: @"c_email"];
[fetch appendFormat: @"<email>%@</email>",
[field stringByEscapingXMLString]];
if (LDAPContactInfoAttribute)
{
field = [currentUser objectForKey: LDAPContactInfoAttribute];
if ([field length])
[fetch appendFormat: @"<info>%@</info>",
[field stringByEscapingXMLString]];
}
[fetch appendString: @"</user>"];
if (![field isEqualToString: login])
{
[fetch appendFormat: @"<user><id>%@</id>",
[field stringByEscapingXMLString]];
field = [currentUser objectForKey: @"cn"];
[fetch appendFormat: @"<displayName>%@</displayName>",
[field stringByEscapingXMLString]];
field = [currentUser objectForKey: @"c_email"];
[fetch appendFormat: @"<email>%@</email>",
[field stringByEscapingXMLString]];
if (LDAPContactInfoAttribute)
{
field = [currentUser objectForKey: LDAPContactInfoAttribute];
if ([field length])
[fetch appendFormat: @"<info>%@</info>",
[field stringByEscapingXMLString]];
}
[fetch appendString: @"</user>"];
}
}
return fetch;