Assuming that the session.invalidate() is not working.
FlexContext.getFlexSession() should be returning the session object
for the new user and not the object of the old user who logged off,
more over when another user logs in, shouldn't the
userSession.setAttribute("userid", userid) be overwriting the value
with new userId ??
Can you please check out if something else is going wrong.
Thanks for your response. The issue is resolved and the
mistake was mine. I used flex from the view point of traditional
web programing. On loading a flash page i used the onCreate event
to call the Remote object behind to retrieve the user name. So when
i sign out and sign in as different user , since the call was made
on the Page onCreate event the RO call is not made again to
retrieve the new user name. So i called the RO once the user signed
in and i could see the signed in user name reflected in the flash