Fix conflicts with externalLoginWithEmail + DomainBasedUid
On multidomain environment (SOGoEnableDomainBasedUID) with email for imap authentication (SOGoForceExternalLoginWithEmail) we need to use uid@domain instead of just uid in method getEmailForUID
This commit is contained in:
parent
9922ec56d9
commit
37461e650d
|
@ -362,6 +362,7 @@ static Class NSNullK;
|
||||||
NSDictionary *contactInfos;
|
NSDictionary *contactInfos;
|
||||||
NSString *login;
|
NSString *login;
|
||||||
SOGoDomainDefaults *dd;
|
SOGoDomainDefaults *dd;
|
||||||
|
SOGoSystemDefaults *sd;
|
||||||
|
|
||||||
contactInfos = [self contactInfosForUserWithUIDorEmail: uid
|
contactInfos = [self contactInfosForUserWithUIDorEmail: uid
|
||||||
inDomain: domain];
|
inDomain: domain];
|
||||||
|
@ -372,10 +373,22 @@ static Class NSNullK;
|
||||||
dd = [SOGoDomainDefaults defaultsForDomain: domain];
|
dd = [SOGoDomainDefaults defaultsForDomain: domain];
|
||||||
else
|
else
|
||||||
dd = [SOGoSystemDefaults sharedSystemDefaults];
|
dd = [SOGoSystemDefaults sharedSystemDefaults];
|
||||||
|
|
||||||
login = [dd forceExternalLoginWithEmail] ? [self getEmailForUID: uid] : uid;
|
if ([dd forceExternalLoginWithEmail])
|
||||||
|
{
|
||||||
|
sd = [SOGoSystemDefaults sharedSystemDefaults];
|
||||||
|
if ([sd enableDomainBasedUID])
|
||||||
|
// On multidomain environment we must use uid@domain
|
||||||
|
// for getEmailForUID method
|
||||||
|
login = [NSString stringWithFormat: @"%@@%@", uid, domain];
|
||||||
|
else
|
||||||
|
login = uid;
|
||||||
|
login = [self getEmailForUID: login];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
login = uid;
|
||||||
}
|
}
|
||||||
|
|
||||||
return login;
|
return login;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue