View Full Version : user registration using email verification
04-01-2010, 03:48 PM
i have done a user registration form and when users click submit, it updates the user database and flags a value 0 in an active field in users table. Now i want to send users an url and when they click on the url the active flag in my users table should change.
Can anyone please help me on this?
04-01-2010, 04:26 PM
I'm not really clear what part you need help with... the update query? Or what specifically has you tripped up?
04-02-2010, 03:25 AM
actually i have a user table with the following field:
ID NAME PASS EMAIL ACTIVE
and i have user registration form which ask users for the above details, excluding the "active" part, which by default is false. I want to send a URL to the user in their given email and when they click on that URL then the "active" field should change to True.
04-02-2010, 03:50 AM
I'd suggest adding another field to that table.
Then whenever you create an account, generate a random string of alphanumeric characters and store it in that field.
Afterwards, send an email to the user with a specific link such as "http://firstname.lastname@example.org&key=sadaqwe348194085ry324" where key is the generated random string
Before activating, check the email address and verify the "key" associated to it and also make sure "active" is still set to FALSE. If those conditions are met, update "active" to TRUE.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.