diff --git a/SoObjects/SOGo/SOGoUserFolder.m b/SoObjects/SOGo/SOGoUserFolder.m index ba8414b81..2a44128e8 100644 --- a/SoObjects/SOGo/SOGoUserFolder.m +++ b/SoObjects/SOGo/SOGoUserFolder.m @@ -427,7 +427,8 @@ { currentUser = [users objectAtIndex: i]; field = [currentUser objectForKey: @"c_uid"]; - if (enableDomainBasedUID) + if (enableDomainBasedUID && + [field rangeOfString: @"@"].location == NSNotFound) field = [NSString stringWithFormat: @"%@@%@", field, domain]; if (![field isEqualToString: login]) { diff --git a/SoObjects/SOGo/SOGoUserManager.m b/SoObjects/SOGo/SOGoUserManager.m index 125ca3fcc..fd8105c0b 100644 --- a/SoObjects/SOGo/SOGoUserManager.m +++ b/SoObjects/SOGo/SOGoUserManager.m @@ -622,7 +622,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; diff --git a/UI/MainUI/SOGoRootPage.m b/UI/MainUI/SOGoRootPage.m index df3e944b1..dc9712e88 100644 --- a/UI/MainUI/SOGoRootPage.m +++ b/UI/MainUI/SOGoRootPage.m @@ -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]; }