How to retrieve a user's full name

Sebastian Birnbach <[email protected]> Sun, 8 Jan 2017 17:41:42 +0100
Newsgroups gmane.comp.horde.devel
Message-ID <CACTNBFPE9aZqTB-CjRc_xj99G6_L22tiy9kukH_x8zNWNdktHw@mail.gmail.com>
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
-- 
dev mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: [email protected]