cancel
Showing results for 
Search instead for 
Did you mean: 

Getting the currently logged in user in a Composite Application

Former Member
0 Kudos

Hi Experts,

I have created a Composite Application, the UI layer includes VC and the I have created a Process in GP.

I need to get the currently logged on user.

I have used the following API



IUser user= UMFactory.getLogonAuthenticator().getLoggedInUser();
String ret = user.getName();

But it gives me the user name : Guest (we usually get this when there is no user assigned or the user is not found)

So, is there a problem with the way I am trying to obtain the username or something with the way the user description is stored in the system ?

--- Brian

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Brian,

To get the currently logged User of Portal from VC, this is what I do:

In the model place the User Data Connector (can be found under the Compose -> Connectors - when in design of the model)

To pass it to the Web Service I give in


=[user data]@UNIQUENAME

You can also select this from the Expresion box. Selecting Data Fields and then search for "User Data", there in you can then drag the Uniquename field.

Let me know.

Best regards,

Dharmi

Edited by: Dharmi Tanna on Sep 17, 2008 4:20 PM

Former Member
0 Kudos

Hi Dharmi,

Thanks for the quick reply.

But yet I am getting the UserName = Guest.

Just wanted to ask you, the username which I am trying to fetch in

1) Composite Application(using the Java code I pasted in my first post in this thread)

2) Visual Composer

3) Portal

will return which user

1) When I am accessing the application from WSNavigator

2) When testing from VC

3) When running the application in a GP process

Because as far as I have read, we get the user as Guest, when the actual user wasn't fetched properly.

Thanks for the help u gave.

Looking forward to your reply.

--- Brian

Former Member
0 Kudos

Hi Brian,

Here the [screenshot|http://img218.imageshack.us/my.php?image=userdataay6.jpg] of userdata runtime and designtime.

When the VC application is started, one always has to authenticate. If the authentication is correct then you would see the application with the welcome message. The guest user would only be able to see this application if you have assigned him the application role.

Best regards,

Dharmi

Answers (0)