I have a suspicion as to what might be causing this, but I need to bounce it off of someone that knows RoundCube better than myself. I have LDAP settings that look like this:
'search_fields' => array('mail', 'cn', 'displayName', 'mailNickname'),
'name_field' => 'displayName',
'email_field' => 'mail',
'surname_field' => 'sn',
'firstname_field' => 'givenName',
'sort' => 'sn',
'scope' => 'sub', // search mode: sub|base|list
'filter' => '(&(mailNickname=*)(sn=*)(!(msExchHideFromAddressLists=TRUE))),
So here's the desired outcome - I'd like the Display Names that appear by default to be literally the user's displayName attribute, and for those to be ordered by last name (sn). It appears that the above works, HOWEVER there's a problem. All of the fields in the Display Name column in RoundCube are blank! The bottom of the screen reads: "Contacts 1 to 40 of 2000". If I click on one of those blanks, a user appears - and as such, those blanks are ordered by last name. Very strange!
Now, if I change name_field from displayName to cn, those fields are populated with the cn - but here that isn't useful, because those cn's are numeric.
(I didn't do it, HONEST!) If I change it to company, the companies get listed. I can change it to anything basically but displayName. If I do that, the fields render blank. Now the reason I suspecting is because our display names look like this:
Lastname, Firstname (US)
These are generated by a script that pulls Lastname from sn, Firstname from givenName, and (US) from c - or if c is null, it checks phone numbers and cross-references the formatting of the phone number to give us a 2-letter country code.
My suspicion is that the use of either that comma or the parenthesis is causing the issue. Is there anyone that could confirm that? For my part, I've been checking to see if commas or parens somehow violate RFC for displayName. Help?