no multiple login

Is there a features of scriptcase about this no multiple login?
What i mean is if the person1 is login using user1 and the person2 want to login
using user1(same account as person1) it cant be.
How could i do that.

There is a store session in db function here in scriptcase
but how can i use it.

Many thanks in advance.

regards,
ghulma

Re: no multiple login

Hello ghulma, the scriptcase doesn’t have this option.
But you can try to validate using code.
I don’t have the idea right now, i can think later to show more or less how to do it.

Re: no multiple login

Thank You so much for your reply max,
me too. i think about it. in inform others after success.

regards,
ghulma

Re: no multiple login

One solution can be to insert a row in a temp table - if there is a row for that user in the table, the user has already logged in.
You can delete entries from that table during log out/after some interval to allow relogin

Re: no multiple login

Notice that by doing so, if the user does not log out, he will not be able to login afterwards. By adding a time interval to allow relogin will not solve this matter completely, as the user might be unable to login for a few minutes.

regards,
Bernhard Bernsmann

Re: no multiple login

So are we left with an option to save a session variable, to indicate that the user has logged in?
I am not an expert in this, but trying to figure out how this can be done.

Session variables are automatically destroyed once the user closes his browser. Aren’t they?

Re: no multiple login

i solved this using ession_set_save_handler() function…
with minimun garbage collector.

hope this help

Re: no multiple login

…Or we can ask whether the user wants to kill his session, just like SC does :slight_smile:

Re: no multiple login

Exactly :slight_smile:

regards,
Bernhard Bernsmann

Re: no multiple login

as i said before. if you use session_set_save_handler() of php. you can set a time before the session die from the server.

or its about conditioning of cookie + session b4 login