Hi to everybody,
I would like to know if someone has already faced the following problem: I
have to manage the access to a reserved area in such way to prevent that two
accounts are contemporarily active.
The problem doesn't apparently seem difficult: I add a field "loggato" in
the table "consumers" (what it also serves me for the user authentication)
and when I make the login (correct username and password) set to 1 that
field, while during the logout set to 0 that field. During the login
obviously I verify that the field "loggato" both to 0 because in contrary
case I prevent the access (the consumer is already login).
Excuse me for the premise but it was essential to understand to fund the
true problem: for the nature of the reserved area obviously I manage the
sessions with a cookie, now with the new feature that has been me in demand
it occurs the following problem: if the consumer allows to expire the cookie
or if closes the browser any reset the field "loggato" to 0 and so that
consumer cannot login anymore!
If someone is already found with a similar problem I would be really
thankful if you/he/she could give me a right-hand...
Thanks in advance.
Regards.
Enea
I would like to know if someone has already faced the following problem: I
have to manage the access to a reserved area in such way to prevent that two
accounts are contemporarily active.
The problem doesn't apparently seem difficult: I add a field "loggato" in
the table "consumers" (what it also serves me for the user authentication)
and when I make the login (correct username and password) set to 1 that
field, while during the logout set to 0 that field. During the login
obviously I verify that the field "loggato" both to 0 because in contrary
case I prevent the access (the consumer is already login).
Excuse me for the premise but it was essential to understand to fund the
true problem: for the nature of the reserved area obviously I manage the
sessions with a cookie, now with the new feature that has been me in demand
it occurs the following problem: if the consumer allows to expire the cookie
or if closes the browser any reset the field "loggato" to 0 and so that
consumer cannot login anymore!
If someone is already found with a similar problem I would be really
thankful if you/he/she could give me a right-hand...
Thanks in advance.
Regards.
Enea
Comment