Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

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");
  • No labels