diff --git a/ChangeLog b/ChangeLog index 940c129d0..c674aa6be 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-09-26 Wolfgang Sourdeau + + * SoObjects/Contacts/SOGoContactLDAPEntry.m ([SOGoContactLDAPEntry + -vCard]): set the card's fn to attribute "displayName" if found + before "cn". + 2006-09-20 Wolfgang Sourdeau * SoObjects/Contacts/SOGoContactLDAPEntry.m ([SOGoContactLDAPEntry diff --git a/SoObjects/Contacts/SOGoContactLDAPEntry.m b/SoObjects/Contacts/SOGoContactLDAPEntry.m index 343b1b393..53e1037a1 100644 --- a/SoObjects/Contacts/SOGoContactLDAPEntry.m +++ b/SoObjects/Contacts/SOGoContactLDAPEntry.m @@ -143,7 +143,10 @@ [vcard setVClass: @"PUBLIC"]; [vcard setProdID: @"-//OpenGroupware.org//SOGo"]; [vcard setProfile: @"vCard"]; - [vcard setFn: [ldapEntry singleAttributeWithName: @"cn"]]; + info = [ldapEntry singleAttributeWithName: @"displayName"]; + if (!(info && [info length] > 0)) + info = [ldapEntry singleAttributeWithName: @"cn"]; + [vcard setFn: info]; surname = [ldapEntry singleAttributeWithName: @"sn"]; if (!surname) surname = [ldapEntry singleAttributeWithName: @"surname"];