Displaying the user avatar

Avatar of the logged-in user is displayed in the upper-right corner of HTML Workspace. Also, the avatars of direct reports in the organizational hierarchy are displayed in the Manager View. You can configure HTML Workspace to pick the user images from your database, say LDAP server.

Note:

The supported aspect ratio of the user images is 1:1.

  1. Create a DSC, using the details mentioned in the next step. For more information, see 'Developing Components for LiveCycle' topic in Programming with LiveCycle guide.

  2. In the DSC, define a new SPI which exposes getCurrentUserImageUrl and getUserImageUrl methods to get an image URL for an Adobe® LiveCycle® user. Following is a sample Java™ code snippet:

    public class DemoUserImageURLProviderService { 
      public String getCurrentUserImageUrl() 
      { 
         // return the URL for profile Image of logged in user 
      } 
      public String getUserImageUrl(String principalOid) 
      { 
          // return the URL for profile Image for user represented by this principal Oid 
       } 
    }
  3. Create a component.xml file. Ensure that spec-id is as shown in the code snippet below.

    The following code snippet is a sample. Customize it to suit your specific requirements.

    <component xmlns="http://adobe.com/idp/dsc/component/document"> 
        <component-id>com.adobe.sample.DemoUsersComponent</component-id> 
        <version>1.1</version> 
        <supports-export>false</supports-export> 
        <descriptor-class>com.adobe.idp.dsc.component.impl.DefaultPOJODescriptorImpl</descriptor-class> 
        <services> 
            <service name="DemoUserImageURLProviderService" title="Demo User ImageURL provider service" orchestrateable="false"> 
            <auto-deploy service-id="DemoUserImageURLProviderService" category-id="Demo Users Component DSC" major-version="1" minor-version="0" /> 
            <description>Service for resolving user image url.</description> 
             <specifications> 
             <specification spec-id="com.adobe.idp.taskmanager.dsc.enterprise.UserImageUrlProvider"/> 
             </specifications> 
            <specification-version>1.0</specification-version> 
            <implementation-class>com.adobe.sample.demousers.DemoUserImageURLProviderService</implementation-class> 
            <request-processing-strategy>single_instance</request-processing-strategy> 
            <supported-connectors>default</supported-connectors> 
            <operation-config> 
                <operation-name>*</operation-name> 
                <transaction-type>Container</transaction-type> 
                <transaction-propagation>supports</transaction-propagation> 
                <!--transaction-timeout>3000</transaction-timeout--> 
            </operation-config> 
            <operations> 
                <operation anonymous-access="false" name="getCurrentUserImageUrl" method="getCurrentUserImageUrl"> 
                    <output-parameter name="result" type="java.lang.String"/> 
                </operation> 
                <operation anonymous-access="false" name="getUserImageUrl" 
    method="getUserImageUrl"> 
                <input-parameter name="principalOid" type="java.lang.String"/> 
                <output-parameter name="result" type="java.lang.String"/> 
                </operation> 
            </operations> 
            </service> 
        </services>
    </component>
  4. Deploy DSC through LiveCycle Workbench. Restart ProcessManagementClientSessionService service.

  5. You may have to refresh your browser or logout/login with the user again.

 Adobe

Get help faster and easier

New user?

Adobe MAX 2024

Adobe MAX
The Creativity Conference

Oct 14–16 Miami Beach and online

Adobe MAX

The Creativity Conference

Oct 14–16 Miami Beach and online

Adobe MAX 2024

Adobe MAX
The Creativity Conference

Oct 14–16 Miami Beach and online

Adobe MAX

The Creativity Conference

Oct 14–16 Miami Beach and online