General support for user attributes
You need to add to your portlet.xml something like
Declaring a user attribute in portlet.xml
<user-attribute> <description>User Family Name</description> <name>user.name.family</name> </user-attribute>
where the <name> attribute is the Key mapped within your PersonDirectory.xml or personDirs.xml (see manual chapter on user attributes).
Then from within your Portlet code you can access the values like this
Accessing a user attribute from JSR-168 Java implementation
Map userInfo = (Map)request.getAttribute(PortletRequest.USER_INFO); String surname = (String)userInfo.get("user.name.family");
Special support for conveying the end user's password to the JSR-168 portlet
Cache and replay passwords only with sober consideration
Don't use uPortal's password caching and replay features unless you really want these behaviors! Don't expose end user passwords to portlets you don't trust. (Then again, don't install into your portal portlets you don't trust.)
The user attribute "password" is populated with the end user's cached password when a caching security context is used.
Declaring password user attribute in portlet.xml
<user-attribute> <description>Specially treated user attribute name that will be populated with the end user's cached password, if available</description> <name>password</name> </user-attribute>
Then from within your Portlet code you can access the password like this
Accessing a user attribute from JSR-168 Java implementation
Map userInfo = (Map)request.getAttribute(PortletRequest.USER_INFO); String password = (String)userInfo.get("password");