powered by Jive Software

Retrieving a user''s first and last name from a Session

I was playing around with Jive Messenger and wanted to know if it’‘s possible to fetch a user’‘s first and last name instead of just the JID. Looking at the session listing in the admin module, I came across “sess.getAddress()” to fetch the JID but I was wondering if it’'s possible to fetch a user first and last. Basically, in the session listing, I would like to show more user info. Thanks

Jean

Hi Jean,

From within a session there is no direct way to get a user’'s name. User names are stored in Messenger in a single, optional field, and can be accessed by first retrieving a user from the UserManager and then via the User.getName() method.

It maybe possible to retrieve a users first and last name if that user has filled out their vCard info to include such information. If the user has provided that information you can retrieve it via the VCardManager.

Hope that helps,

Ryan