Normally, if you are using adapters or the servlets to find out, you may want to maintain the map of the username=UserSessionID.
To get the usersession id, get you can use FlexContext.getFlexSession() or you can use FlexSession.getServletRequest().getSession()
More no this here