Author: rdickens
Date: 2013-01-10 20:32:21 -0500 (Thu, 10 Jan 2013)
New Revision: 9042
Modified:
epp/docs/branches/6.0/Reference_Guide/en-US/extras/Authentication_Identity_AccessingUserProfile/default91.java
epp/docs/branches/6.0/Reference_Guide/en-US/modules/AuthenticationAndIdentity/AccessingUserProfile.xml
Log:
Brought content up to match wiki version 3
Modified:
epp/docs/branches/6.0/Reference_Guide/en-US/extras/Authentication_Identity_AccessingUserProfile/default91.java
===================================================================
---
epp/docs/branches/6.0/Reference_Guide/en-US/extras/Authentication_Identity_AccessingUserProfile/default91.java 2013-01-10
06:09:07 UTC (rev 9041)
+++
epp/docs/branches/6.0/Reference_Guide/en-US/extras/Authentication_Identity_AccessingUserProfile/default91.java 2013-01-11
01:32:21 UTC (rev 9042)
@@ -2,8 +2,11 @@
PortalRequestContext context = PortalRequestContext.getCurrentInstance() ;
// Get the id of the user logged
String userId = context.getRemoteUser();
+
+// Retrieve OrganizationService but it works only from WebUI code. See variants below in
documentation
+OrganizationService orgService = getApplicationComponent(OrganizationService.class) ;
+
// Request the information from OrganizationService:
-OrganizationService orgService = getApplicationComponent(OrganizationService.class) ;
if (userId != null)
{
User user = orgService.getUserHandler().findUserByName(userId) ;
Modified:
epp/docs/branches/6.0/Reference_Guide/en-US/modules/AuthenticationAndIdentity/AccessingUserProfile.xml
===================================================================
---
epp/docs/branches/6.0/Reference_Guide/en-US/modules/AuthenticationAndIdentity/AccessingUserProfile.xml 2013-01-10
06:09:07 UTC (rev 9041)
+++
epp/docs/branches/6.0/Reference_Guide/en-US/modules/AuthenticationAndIdentity/AccessingUserProfile.xml 2013-01-11
01:32:21 UTC (rev 9042)
@@ -5,6 +5,7 @@
]>
<chapter id="sect-Reference_Guide-Accessing_User_Profile">
<title>Accessing User Profile</title>
+ <remark>NOTE: Content updated to wiki version 4 (10 Jan 2013)</remark>
<para>
The following code retrieves the details for a logged-in user:
</para>
@@ -20,4 +21,7 @@
<programlisting language="Java"
role="Java"><xi:include
xmlns:xi="http://www.w3.org/2001/XInclude"
href="../../extras/Authentication_Identity_AccessingUserProfile/default93.java"
parse="text"/></programlisting>
</listitem>
</orderedlist>
+ <para>
+ Both alternatives are probably better then {{OrganizationService orgService =
getApplicationComponent(OrganizationService.class)}} because you can use them from your
own portlets or servlet/portlet filters. Variant with {{getApplicationComponent}} works
only from WebUI.
+ </para>
</chapter>