1 Reply Latest reply on Apr 1, 2009 9:40 AM by apemberton

    Adding new attribute for a user.

    bensonfungjava

      Hi,

      I would like to add one more attribute for the user, e.g. age. Can anyone suggest how to add it?


      thanks
      Benson

        • 1. Re: Adding new attribute for a user.

          Benson: your answer depends a bit on your usage scenario.

          If you're using the identity module for your security implementation, you can map user profile attributes to LDAP attributes or database columns in:

          PS_HOME/server/default/deploy/jboss-portal.sar/conf/identity/profile-config.xml


          You can then access these directly in your portlet views:

          ${requestScope['javax.portlet.userinfo']['user.name.given']}


          By adding them to your portlet.xml:

          <user-attribute>
           <description>User Given Name</description>
           <name>user.name.given</name>
          </user-attribute>