Fixed mess regarding uid/realUID

pull/86/head
Ludovic Marcotte 2015-05-22 14:03:49 -04:00
parent c8995087d8
commit 4f303f8aa2
1 changed files with 6 additions and 2 deletions

View File

@ -197,8 +197,12 @@
// When the user is associated to a domain, the [SOGoUser login]
// method returns the combination login@domain while
// [SOGoUser loginInDomain] only returns the login.
uid = [NSString stringWithString: realUID];
realUID = [NSString stringWithFormat: @"%@@%@", realUID, domain];
r = [realUID rangeOfString: domain options: NSBackwardsSearch|NSCaseInsensitiveSearch];
if (r.location != NSNotFound)
uid = [realUID substringToIndex: r.location-1];
else
uid = [NSString stringWithString: realUID];
}
}