Hi,
You can try creating a portal component which reads the logged in user and writing it back to response, and an iView from this portal component.
Then just call /include the iView, or directly call the portal component.
Then decide what needs to be done.
Sample code:
UserFactory userfact=UMFactory.getUserFactory();
IUser user=userfact.getUserByUniqueName(request.getUser().getUserId());
String usrid=user.getUniqueName();
Best Regards,
Tal