(fix) integrated latest OC changes

This commit is contained in:
Ludovic Marcotte
2016-06-23 08:58:25 -04:00
parent bd0ff6043c
commit 4a74f00adb
72 changed files with 2836 additions and 1986 deletions
+19 -2
View File
@@ -57,6 +57,7 @@
#include "SOGoCache.h"
#include "SOGoSource.h"
#include "SOGoSystemDefaults.h"
#include "SOGoUserManager.h"
#include "SOGoUser.h"
@@ -102,13 +103,29 @@
+ (id) groupWithIdentifier: (NSString *) theID
inDomain: (NSString *) domain
{
NSString *uid;
NSRange r;
NSString *uid, *inDomain;
SOGoSystemDefaults *sd;
uid = [theID hasPrefix: @"@"] ? [theID substringFromIndex: 1] : theID;
inDomain = domain;
sd = [SOGoSystemDefaults sharedSystemDefaults];
if ([sd enableDomainBasedUID])
{
/* Split domain from uid */
r = [uid rangeOfString: @"@" options: NSBackwardsSearch];
if (r.location != NSNotFound)
{
if (!domain)
inDomain = [uid substringFromIndex: r.location + 1];
uid = [uid substringToIndex: r.location];
}
}
return [SOGoGroup groupWithValue: uid
andSourceSelector: @selector (lookupGroupEntryByUID:inDomain:)
inDomain: domain];
inDomain: inDomain];
}
+ (id) groupWithEmail: (NSString *) theEmail