Had this coded for me by one of my programmers, thought it might come in handy for some of you guys!
Authentication Class - AuthClass
Syed Imran Moinuddin
23rd September 2006
-> All passwords in the DB must be stored as MD5 hashed.
-> The AuthClass object offers two key functions (not including internal functions):
The function will accept the username and password as provided by the user and then proceed to compare the md5 hashed
value of the password with the encrypted password in the database.
The function will check the browser session and compare against active sessions in the database and return a boolean to
the caller on the validity of the session. verify can be called on the top of all pages which require security. It is
better to place it in a consistently present include to avoid code repetition.
This will destroy session variables associated with the existing login and should be triggered such as when the user clicks
a logout button as well.
Last edited by Sam Granger : 09-08-2007 at 04:58 PM.
The Following 3 Users Say Thank You to Sam Granger For This Useful Post: