05 Consuming uPortal User Attributes as JSR-168 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");