diff --git a/SoObjects/SOGo/SOGoSession.m b/SoObjects/SOGo/SOGoSession.m index 235ef371e..936877336 100644 --- a/SoObjects/SOGo/SOGoSession.m +++ b/SoObjects/SOGo/SOGoSession.m @@ -261,9 +261,7 @@ // The domain is probably appended to the username; // make sure it is defined as a domain in the configuration. *theDomain = [*theLogin substringFromIndex: (r.location + r.length)]; - if ([[sd domainIds] containsObject: *theDomain]) - *theLogin = [*theLogin substringToIndex: r.location]; - else + if (![[sd domainIds] containsObject: *theDomain]) *theDomain = nil; } }