login managment

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Enea

    login managment

    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


  • Jeffrey Silverman

    #2
    Re: login managment

    On Tue, 23 Mar 2004 11:28:20 +0100, Enea wrote:
    [color=blue]
    > 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[/color]

    You may want to try sessions instead of cookies to manage logins.

    I'm not clear on why setting "loggato" to zero by closing the browser is
    causing a problem, though.

    --
    Jeffrey D. Silverman | jeffrey AT jhu DOT edu
    Website | http://www.wse.jhu.edu/newtnotes/

    Comment

    Working...