Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-3407

Unable to retrieve Job Title from User-Attributes

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Duplicate
    • Affects Version/s: 5.2.2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      I am unable to retrieve the Job Title from the user-attributes. I've added the user attribute to the portlet.xml as follows:

      <user-attribute>
      <description>User Job Title</description>
      <name>user.jobtitle</name>
      </user-attribute>

      I tried using the following to retrieve the job title from the jsp and from the portlet

      Map userInfo = (Map)renderRequest.getAttribute(PortletRequest.USER_INFO);
      String jobTitle = (userInfo != null) ? (String)userInfo.get("user.jobtitle") : "";

      I am able to retrieve other user-attributes, so I am pretty sure my code is ok. Also, I can get the job title from the Liferay user object, so I know the job title is there.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              samuel.kong Samuel Kong
              Reporter:
              jeffrey.handa Jeffrey P. Handa
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                12 years, 20 weeks, 6 days ago

                  Packages

                  Version Package