[ic] Controlling number of active sessions?

Jonathan Clark interchange-users@interchange.redhat.com
Sat May 4 09:07:01 2002


> Might there be some way to control the number of active sessions?
>
> More to the point.  The requirement is to:
>
> 1. Control the number of users entered in the UserDB (this should be easy)

yes, I would do this at the tio of the new_account page:

[sql query="SELECT count(username) FROM userdb" list=1]
	[tmp usercount][sql-code][/tmp]
[/sql]

[if scratch usercount > 10]
	[bounce href=no_more_accounts.html]
[/if]

> 2. Make sure users can not share sessions.  I guess the idea here would be
> if a user logs on expire all other sessions that user is logged on with.
> (I know this is restrictive since the user couldn't have more than one
> browser session open at once!)

I think this can be done by cookies. If you set the expire information on
the cookie it will be written to disk on the client and therefore will be
passed back by the other browser instances, ensuring a single session. The
workaround for the user is to open a different browser for the second
session, eg. IE then NS.

I think users who don't have cookies enabled should get only one session
anyway.

Jonathan
Webmaint.