In WPS Portal, you might require to get logged in user in any of the theme jsp, like default.jsp.
Portal tag lib provides a tag to get logged in user
If the user is logged in, this tag returns one of the specified user attributes, value can be any user attribute defined to Member Manager.
But in some situations, you might require to get logged in user id in a java string and pass to some method call for further processing.
Here is the code snippet to get logged in user in any of theme jsp
com.ibm.portal.puma.User portalUser= (com.ibm.portal.puma.User)request.getAttribute(com.ibm.portal.RequestConstants.REQUEST_USER_OBJECT);
String loggedInUser = (String) portalUser.get("uid");