[dev] How to retrieve a user's full name

Sebastian Birnbach birnbacs at gmail.com
Sun Jan 8 16:41:42 UTC 2017


I am trying to retrieve a user's name from Horde. The particular user I am
testing has two identities and two full names in the preference pane (in my
case ' Dr. Jekyll' and 'Mr. Hyde').

To my understanding, the full name in the currently active identity should
be retrievable through $prefs->getValue('fullname'), but this returns an
empty string. The same is true for $prefs->getValue('id').

$prefs->getValues('identities') returns a longer string that contains the
desired information, but embedded in an unknown structure:
a:3:{i:0;a:7{s:16:"default_identity";i:0;s:9:"from_addr";s:0:"";s:8:"fullname";s:0:"";s:2:"id";s:18:"Standardidentität";s:10:"identities";s:6:"a:0:{}";s:10:"properties";N;s:8:"location";s:0:"";}i:1;a:4:{s:2:"id";s:6:"Jekyll";s:8:"fullname";s:10:"Dr.
Jekyll";s:9:"from_addr";s:0:"";s:8:"location";s:0:"";}i:2;a:4:{s:2:"id";s:4:"Hide";s:8:"fullname";s:8:"Mr.
Hide";s:9:"from_addr";s:0:"";s:8:"location";s:0:"";}}

What is the preferred way of obtaining the full name of the current user?


  Sebastian


More information about the dev mailing list