Access all CHttpSessions on the server?

My app deletes users from the db after they logout. It needs to be this way, why is not important. If they don’t logout however, if they just close their browser their name stays in the db. This is no good since the app can’t allow duplicate usernames, so if joe logs in on tuesday and closes his browser without logging out, he won’t be able to log back in on wednesday with the same name. I’m building the app for some people, what they’ve suggested is that if a user tries to login with a username already existing in the db, just write over it. But if that person happens to be logged in at the time that wouldn’t be cool, so they said to check somehow if that user is associated with a live session, if it is then don’t use it, if not, write over it. Is there a way to iterate over all current sessions on the server, or an alternative. Is there a good solution here that anyone can think of ?

session garbage collection automatic

hope this give you some idea :lol: