[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Controlling number of active sessions?
--- Jonathan Clark <jonc@webmaint.com> wrote:
> > 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.
Jonathan,
I don't think you understood my question. I want
to see if there is a way to stop a user from
logging in as the same user on two different PC's.
That way I can count the number of active user
sessions and disallow anyone to log in if they
are over a certain number. In other words, allow
them to add 100 users, but only allow (say) 10 unique
sessions active at a time.
__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com