From 124a263f93d2493378d7a0b0ef2f9b6268d54295 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 3 Jul 2009 16:34:47 +0000 Subject: [PATCH] Monotone-Parent: 7545ebe978dbef5b48ca8ca88c024f6eaf3169a4 Monotone-Revision: 578cb5190f19cdf4730fac81fc0bbf070252b2b4 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-07-03T16:34:47 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 6 ++++++ SoObjects/SOGo/LDAPUserManager.m | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ad982956b..20f93e2b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-07-03 Wolfgang Sourdeau + + * SoObjects/SOGo/LDAPUserManager.m (_fillContactMailRecords:): if + the user uid contains a "@", we set it directly as system email + rather than suffixing it with the default mail domain. + 2009-07-02 Francis Lachapelle * UI/MailerUI/UIxMailListView.m ([UIxMailListView diff --git a/SoObjects/SOGo/LDAPUserManager.m b/SoObjects/SOGo/LDAPUserManager.m index bca7e18c3..77c0883c6 100644 --- a/SoObjects/SOGo/LDAPUserManager.m +++ b/SoObjects/SOGo/LDAPUserManager.m @@ -330,7 +330,11 @@ static NSLock *lock = nil; emails = [contact objectForKey: @"emails"]; uid = [contact objectForKey: @"c_uid"]; - systemEmail = [NSString stringWithFormat: @"%@@%@", uid, defaultMailDomain]; + if ([uid rangeOfString: @"@"].location == NSNotFound) + systemEmail + = [NSString stringWithFormat: @"%@@%@", uid, defaultMailDomain]; + else + systemEmail = uid; [emails addObjectUniquely: systemEmail]; [contact setObject: [emails objectAtIndex: 0] forKey: @"c_email"]; }