Account Lockout

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Account Lockout

Post by tecktalkcm0391 »

I want to be able to lock users out from my website. I have the user database with a fields for:
  • >> if the user is locked out (1 yes -- 0 no)
    >> how long the user is locked out
    >> time of lockout
I wanted input on how to do this. First I have the login already checking to make sure the account isn't locked out, so the logining in part is taken care of already.

But here is what I wanted input on:

Should I go a AJAX in which if it returns the user is locked out, it changes the layer that I have that is 100% width and height to make it visible, and absolute?

Or should I just have PHP redirect the user to a lockout page when they are locked out.

Or should I just have PHP log the user out. <--- This would be a last resort because I wanted to have the lockout text have why the user is locked out and how long it is and how long they have left.

So any ideas?
Can you tell me some stuff to search for/look at?

Thanks!
printf
Forum Contributor
Posts: 173
Joined: Wed Jan 12, 2005 5:24 pm

Post by printf »

A lockout is a lockout, show them the message once, kill the active session and don't allow them to login until the lockout runtime has expired. As for using the httprequest object over just using PHP, that's your choice, I would go with what works, PHP, because they can't turn it OFF!

pif!
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Post by tecktalkcm0391 »

Ok, I am now thinking about having PHP send them to a page that displays the message that there account is locked out and then kill the sessions and cookies.

Is that a good idea?
Post Reply