(fix) avoid appending the domain unconditionally when SOGoEnableDomainBasedUID is set to YES

This commit is contained in:
Ludovic Marcotte
2015-05-19 13:48:59 -04:00
committed by Jesús García Sáez
parent e2ef0103c4
commit f4963df50f
3 changed files with 8 additions and 4 deletions
+4 -2
View File
@@ -228,7 +228,8 @@
if ([domain isNotNull])
{
sd = [SOGoSystemDefaults sharedSystemDefaults];
if ([sd enableDomainBasedUID])
if ([sd enableDomainBasedUID] &&
[username rangeOfString: @"@"].location == NSNotFound)
username = [NSString stringWithFormat: @"%@@%@", username, domain];
}
@@ -587,7 +588,8 @@
if ([domain isNotNull])
{
sd = [SOGoSystemDefaults sharedSystemDefaults];
if ([sd enableDomainBasedUID])
if ([sd enableDomainBasedUID] &&
[username rangeOfString: @"@"].location == NSNotFound)
username = [NSString stringWithFormat: @"%@@%@", username, domain];
}