Revert "Revert "Fixed mess regarding uid/realUID""

This reverts commit 96d88de564.
This commit is contained in:
Julio García
2015-06-26 09:35:26 +02:00
parent c1b0fd53dc
commit 67d0d95869
+6 -2
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];
}
}