java portlet for oracle portal
Posted on 2005-04-25
This seems like such a simple question, but nobody on Oracle's site seems to be able to come up with a response to it, so I thought I would give it a go here.
This is driving me nuts for a while now! Can somebody please please help me figure out what is wrong? I wish to get the user's First Name as it is stored in OID.
The code below seems as if it should work, but it only gives me the username, instead of the user's first name. Can anyone see if they know why?
PortletRenderRequest pReq = (PortletRenderRequest)
ProviderContext pc = pReq.getProviderInstance().getProviderContext();
OidManager oidman = pReq.getProviderInstance().getOidManager();
String first_name = (oidman != null) ? pReq.getUser().getFirstName().toString() : pReq.getUser().getName().toString();
Thanks in advance!