drewbuschhorn / account_demo

0 stars 0 forks source link

account_demo

Allows you to register for an account, login, update account information, and log out. If you are not logged in and try to access a page requiring a login, you will be redirected back to the login page.

The code is kind of thrown together, since I was learning this all as I was creating the site.

Requires a table with these fields (to function correctly):

FieldTypeNullKeyDefaultExtra
idint(11)NOPRINULLauto_increment
usernamechar(50)NONULL
emailchar(50)NONULL
first_namechar(50)YESNULL
last_namechar(50)YESNULL
unsafe_passchar(50)NONULL
ipchar(45)YESNULL
date_createdtimestampNOCURRENT_TIMESTAMP
suspendedtinyint(1)YES0

Ip is currently unused, and suspended can only be set by directly accessing the database (although the login will check to see if the user is suspended).