(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
parent ae72c2f1d5
commit 416711ea43
4 changed files with 9 additions and 4 deletions
+2 -1
View File
@@ -652,7 +652,8 @@ static Class NSNullK;
// internal cache.
[currentUser setObject: [newPassword asSHA1String] forKey: @"password"];
sd = [SOGoSystemDefaults sharedSystemDefaults];
if ([sd enableDomainBasedUID])
if ([sd enableDomainBasedUID] &&
[login rangeOfString: @"@"].location == NSNotFound)
userLogin = [NSString stringWithFormat: @"%@@%@", login, domain];
else
userLogin = login;