• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

Alla Berman
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)
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?
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!