get uid in WebSphere portal V6.1 - Websphere

This is a discussion on get uid in WebSphere portal V6.1 - Websphere ; I need to fetch the uid of current user in WebSphere portal 6.1 I tried ((ActionRequest)request).getRemoteUser(). But it gives the output with all the attributes in LDAP including group etc Is there any alternative so that I can get only ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: get uid in WebSphere portal V6.1

  1. get uid in WebSphere portal V6.1

    I need to fetch the uid of current user in WebSphere portal 6.1
    I tried ((ActionRequest)request).getRemoteUser(). But it gives the output with all the attributes in LDAP including group etc

    Is there any alternative so that I can get only uid (i.e CN) , instead of getting all its attribute?

    -Thanks

  2. Re: get uid in WebSphere portal V6.1

    Hi,

    You may actually use the puma user library. Example:

    com.ibm.portal.puma.User user= (com.ibm.portal.puma.User) request.getAttribute(com.ibm.portal.RequestConstan ts.REQUEST_USER_OBJECT);
    String userid = (String) user.getUserID();

    Hope it helps.

  3. Re: get uid in WebSphere portal V6.1

    Hi,
    Thanks for your reply.
    In the code you provided, I didnt get the String parameter passed to getAttribute method of request object i.e com.ibm.portal.RequestConstants.REQUEST_USER_OBJEC T. I couldnt find the class(or interface) RequestConstants.

    -Thanks

+ Reply to Thread