cancel
Showing results for 
Search instead for 
Did you mean: 

How to reference the current user ID in an URL iView

Former Member
0 Kudos

Hi

I have created an iview based on URL iview.

I need to pass the logged on portal user id as parameter to a url.We are using EP6 SP2.

Can any body help me in this regard.

Regards

Sayantan

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi

The problem is solved. Thru app integrator we are able to pass the current id to the url.

Thanks Yoav for suggesting the app integrator solution

Regards

Sayantan

Former Member
0 Kudos

I need to know how we can avoid the user mapping part and also how we pass the logged on user id to the url.

The paramaters which will be passed thru the url will not be visible to the end user.

Basically the portal will be single point of entry where all validation will be done.Once employee logs into the portal he should be able to access the legacy Web site

Regards

Sayantan

Former Member
0 Kudos

Check this for URL iview properties,

http://help.sap.com/saphelp_ep60sp2/helpdata/en/f5/eb51730e6a11d7b84900047582c9f7/content.htm

Instead of URL iview, you can use Application Integrator where you can pass the user id to some other application. This is more powerful than URL iview, check out in SDN for the App Int doc.

Former Member
0 Kudos

If you decide on the Application Integrator solution,

This would help:

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/documents/a1-8-4/the application integrator in ep 6.0

Former Member
0 Kudos

Hi Yoav

Based on the suggestion I am using the application integrator solution. But when I am trying to access the same, the system is prompting for user mapping. My requirement is to avoid the user mapping.

The url is like this tt\home\default.aspx?user=<Portal userid>&flag="portal"

Once we pass the same , the legacy web system will understand that it is called from our enterprise portal(the flag parameter will come into picture) and based on the portal id (the user parameter)it will find the user and display releveant data of the user.

Can you kindly help me in this regard.

Former Member
0 Kudos

You are aware that you are building a very unsecure solution?

Former Member
0 Kudos

Hi SAYANTAN,

You can create a dynpage that takes the current user id, use it to construct the url,

and redirects to that url in doProcessBeforeOutput():

public void doProcessBeforeOutput() throws PageException {
   Form myForm = this.getForm();
   IPortalComponentRequest request = (IPortalComponentRequest)this.getRequest();	
   IUser currUser = (IUser)request.getUser().getUser();
   String userid = currUser.getId();
   String url = "http://myUrl.com?userid="+userid;
   myForm.addRawText("<script>");
   myForm.addRawText("open(""+url+"","_self");");
   myForm.addRawText("</script>");	  
}

Hope that helps,

Yoav.