• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to pass the logged user ID into SDO to filter results

 
Alla Berman
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using RAD 7 and WSP 6 for portlet development.
Portal is LDAP enabled.
I pull user's ID into faces jsp in a portlet.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Here is the code:
<%
javax.naming.Context ctx = new javax.naming.InitialContext();
com.ibm.portal.um.PumaHome home = (com.ibm.portal.um.PumaHome)
ctx.lookup("portal:service/usermanagement/Puma");
PumaProfile profile = home.getProfile( request );
Map userMap = profile.getAttributes(profile.getCurrentUser(),Arrays.asList (new String[]{"uid"}));
Object attrObj = userMap.get("uid");
%>
<form><input type="test" name="test2" value="<%=attrObj%>"></form>
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
It works.

I need to pull data only for one (logged in) user from Oracle 10g db.
I have created SDO, and now I need to pass this user's uid to filter results.
No matter what I tried it did not work.

Can anyone give me an idea how to do it?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic