mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-02 12:02:45 +00:00
(fix) avoid appending the domain unconditionally when SOGoEnableDomainBasedUID is set to YES
This commit is contained in:
committed by
Jesús García Sáez
parent
e2ef0103c4
commit
f4963df50f
@@ -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])
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user