...

View Full Version : check activation status when login



abanana
11-25-2006, 05:18 AM
Hi everyone,

i'm stuck on this the whole night, trying to add an email activation function to my old codes when user register. I can create a activation key and email it to the user, the user then can click the link and activate the new account. my problem is i can not check whether the account is actived or not when user login.

my code is a bit complicated. the login form action="process.php", then the "process.php" will call "session.php", and then "session.php" will call "database.php" to complete the login process.

can you please give me a rough idea how to check the user's activation status?
I can post some codes if you need.

thanks in advance!

lli2k5
11-25-2006, 05:28 AM
store the activation code in MySQL and then call on MySQL when the user activates it, "putting an one" in the activation column.

I might be wrong.

abanana
11-25-2006, 05:49 AM
thanks lli2k5,

you're right, and that's exactly what i did. the new account is actived if the user click the link in sent to their email.

my problem is i don't know how to check it in my login stucture, so the user can still login without activation.

abanana
11-25-2006, 05:59 AM
i got it finally,

by query the username, password and activation status at the same time!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum