(fix) use the source's domain if none is defined (fixes #3523)

pull/14/merge
Ludovic Marcotte 2016-12-20 13:15:15 -05:00
parent 596c4bb4c2
commit 06903f8376
1 changed files with 4 additions and 1 deletions

View File

@ -834,8 +834,11 @@ static Class NSNullK;
{
currentSource = [_sources objectForKey: sourceID];
// Use the provided domain during the lookup. If none is defined, use the source's one
// so if there's a match based on the source's domain, the user ID will be associated
// to the right source.
userEntry = [currentSource lookupContactEntryWithUIDorEmail: theUID
inDomain: theDomain];
inDomain: (theDomain ? theDomain : [currentSource domain])];
if (userEntry)
{
[theCurrentUser setObject: sourceID forKey: @"SOGoSource"];