diff --git a/ChangeLog b/ChangeLog index 60a8bfaf8..76c74a431 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2007-05-30 Wolfgang Sourdeau + * SoObjects/SOGo/LDAPUserManager.m ([LDAPUserManager + -getFullEmailForUID:uid]): new method that returns the username + + email pair. + * SoObjects/Appointments/SOGoCalendarComponent.m ([SOGoCalendarComponent +initialize]): the default language for mail templates is now set to English. diff --git a/SoObjects/SOGo/LDAPUserManager.h b/SoObjects/SOGo/LDAPUserManager.h index d7dd8faa3..6a3c6510b 100644 --- a/SoObjects/SOGo/LDAPUserManager.h +++ b/SoObjects/SOGo/LDAPUserManager.h @@ -54,6 +54,7 @@ - (NSString *) getCNForUID: (NSString *) uid; - (NSString *) getEmailForUID: (NSString *) uid; +- (NSString *) getFullEmailForUID: (NSString *) uid; - (NSString *) getUIDForEmail: (NSString *) email; - (BOOL) checkLogin: (NSString *) login diff --git a/SoObjects/SOGo/LDAPUserManager.m b/SoObjects/SOGo/LDAPUserManager.m index 6b0379d1e..e79c1f294 100644 --- a/SoObjects/SOGo/LDAPUserManager.m +++ b/SoObjects/SOGo/LDAPUserManager.m @@ -195,6 +195,17 @@ static NSString *defaultMailDomain = nil; return [contactInfos objectForKey: @"c_email"]; } +- (NSString *) getFullEmailForUID: (NSString *) uid +{ + NSDictionary *contactInfos; + + contactInfos = [self contactInfosForUserWithUIDorEmail: uid]; + + return [NSString stringWithFormat: @"%@ <%@>", + [contactInfos objectForKey: @"cn"], + [contactInfos objectForKey: @"c_email"]]; +} + - (NSString *) getUIDForEmail: (NSString *) email { NSDictionary *contactInfos;