You have to populate the user attributes on a per user basis.
The User Management portlet is one way to do this.
Another solution that we are working: an import program for user information
The jetspeed-portlet.xml is there for mapping custom property names to
portal-defined property names.
Brice Lambi wrote:
I'm trying to get the user attributes, but the only way I can get it to
work
is by going into the user management portlet and manually adding a value.
I've read the guide at
http://portals.apache.org/jetspeed-2/guides/guide-user-attributes.html and
added the jetspeed-portlet.xml to my app, but the attributes are still
null. There is a link on that page that is broken, it looks like it would
talk about jetspeed preferences, so I might be missing something. I'm just
trying to get the username of the current user. Here is my
jetspeed-portlet.xml
<?xml version="1.0"?>
<portlet-app version="1.0"
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
xmlns:js="http://portals.apache.org/jetspeed">
<js:user-attribute-ref>
<js:name>user-name</js:name>
<js:name-link>user.name</js:name-link>
</js:user-attribute-ref>
<js:user-attribute-ref>
<js:name>user-name-given</js:name>
<js:name-link>user.name.given</js:name-link>
</js:user-attribute-ref>
<js:user-attribute-ref>
<js:name>user-name-family</js:name>
<js:name-link>user.name.family</js:name-link>
</js:user-attribute-ref>
</portlet-app>
And I get the values with
Map map = (Map)request.getAttribute(PortletRequest.USER_INFO);
String username = (String)map.get("user.name");
What am I doing wrong?
--
David Sean Taylor
Bluesunrise Software
[EMAIL PROTECTED]
[office] +01 707 773-4646
[mobile] +01 707 529 9194
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]