mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-05 16:35:10 +00:00
Monotone-Parent: 2fdf0ead0781ef2362dd389811d5db44ca4cc84a
Monotone-Revision: c91eef7edcfd08d414664c25a590b6268a7e58e2 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-11-29T04:19:32 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -24,7 +24,6 @@
|
||||
#import <Foundation/NSEnumerator.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSURL.h>
|
||||
#import <Foundation/NSUserDefaults.h>
|
||||
|
||||
#import <NGObjWeb/NSException+HTTP.h>
|
||||
#import <NGObjWeb/SoClassSecurityInfo.h>
|
||||
@@ -59,23 +58,8 @@
|
||||
|
||||
#import "SOGoUserFolder.h"
|
||||
|
||||
static NSString *LDAPContactInfoAttribute = nil;
|
||||
|
||||
@implementation SOGoUserFolder
|
||||
|
||||
+ (void) initialize
|
||||
{
|
||||
NSUserDefaults *ud;
|
||||
|
||||
if (!LDAPContactInfoAttribute)
|
||||
{
|
||||
ud = [NSUserDefaults standardUserDefaults];
|
||||
LDAPContactInfoAttribute
|
||||
= [[ud stringForKey: @"SOGoLDAPContactInfoAttribute"] lowercaseString];
|
||||
[LDAPContactInfoAttribute retain];
|
||||
}
|
||||
}
|
||||
|
||||
/* hierarchy */
|
||||
|
||||
- (NSArray *) toManyRelationshipKeys
|
||||
@@ -230,8 +214,7 @@ static NSString *LDAPContactInfoAttribute = nil;
|
||||
|
||||
results = [NSMutableDictionary dictionary];
|
||||
|
||||
contacts
|
||||
= [[SOGoUserManager sharedUserManager] fetchUsersMatching: uid];
|
||||
contacts = [[SOGoUserManager sharedUserManager] fetchUsersMatching: uid];
|
||||
enumerator = [contacts objectEnumerator];
|
||||
while ((contact = [enumerator nextObject]))
|
||||
{
|
||||
@@ -424,13 +407,10 @@ static NSString *LDAPContactInfoAttribute = nil;
|
||||
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]];
|
||||
}
|
||||
field = [currentUser objectForKey: @"info"];
|
||||
if ([field length])
|
||||
[fetch appendFormat: @"<info>%@</info>",
|
||||
[field stringByEscapingXMLString]];
|
||||
[fetch appendString: @"</user>"];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user