Skip to content

Commit

Permalink
(fix) make sure we don't double-append domain part (fixes #3614)
Browse files Browse the repository at this point in the history
  • Loading branch information
extrafu committed May 6, 2016
1 parent fbd2f15 commit a26b2ec
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions SoObjects/SOGo/SOGoUserManager.m
Expand Up @@ -391,12 +391,16 @@ - (NSString *) getExternalLoginForUID: (NSString *) 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];
if ([sd enableDomainBasedUID] &&
[login rangeOfString: @"@"].location == NSNotFound)
{
// On multidomain environment we must use uid@domain
// for getEmailForUID method
login = [NSString stringWithFormat: @"%@@%@", uid, domain];
}
else
login = uid;

login = [self getEmailForUID: login];
}
else
Expand Down

0 comments on commit a26b2ec

Please sign in to comment.