Portlets can use the IDK to access read-only User Information settings that have been entered by users or imported into the portal using a Profile Source Identity Service.
Once the portlet object has been configured as described above, portlet code can access the User Information settings sent from the portal using the IDK. In the following example code, the portlet retrieves the Company information property (CompanyUserInfo).
Java
... // Get the user's company info setting String companyID; companyID = portletRequest.getSettingValue(SettingType.User, "CompanyUserInfo"); // if the user's company info does not exist, retrieve it from User Info properties if (null == companyID) { companyID = portletRequest.getSettingValue(SettingType.UserInfo, "CompanyUserInfo"); } ...
.NET
... ' Get the user's company info setting Dim companyID As String companyID = portletRequest.GetSettingValue(SettingType.User, "CompanyUserInfo") ' if the user's company info does not exist, retrieve it from User Info properties If companyID Is Nothing Then companyID = portletRequest.GetSettingValue(SettingType.UserInfo, "CompanyUserInfo") End If ...