Member authentification logic, need help

Discussion in 'PHP' started by Philopoemen, Jan 27, 2008.

  1. #1
    Hi there,

    I have a self-made 'forum' on one of my sites.
    The problem is that for half of the users the authentification module doesn't work properly, something wrong with the cookies/sessions.

    So I was wondering, can someone describe the logic of an authentification module here?

    I DON'T NEED A FULL SCRIPT. I need only a list of steps, something like:
    1. Take login+pass from a form.
    2. Run query to MySQL and check for [this]
    3. Do [that]
    4. Save [here]
    ...
    99. Drink beer :)

    I appreciate your attention and help :)
     
    Philopoemen, Jan 27, 2008 IP
  2. decepti0n

    decepti0n Peon

    Messages:
    519
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #2
    0. Check if session variable exists, if it does, then ignore the rest
    1. Login/pass form
    2. Check if username exists, if not, return
    3. If username does exist, fetch password
    4. If password matches what they entered, redirect, set a session variable
    5. If not, redirect back and tell them they got it wrong
    99. Drink beer
     
    decepti0n, Jan 27, 2008 IP
  3. Philopoemen

    Philopoemen Peon

    Messages:
    704
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Oh, I forgot to mention.
    I need the "remember me" function, so some members have to be permanently logged in.
     
    Philopoemen, Jan 27, 2008 IP