close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

How do I create a double opt-in?

Thread began 6/27/2010 10:53 am by mrs | Last modified 7/24/2013 9:26 am by mrs | 9795 views | 28 replies

Jason ByrnesWebAssist

the basic steps for double opt in are:

database:
you need to add 2 new columns to the users table:
randomString - text
emailVarified - int. default value 0. will be updated to 1 when the user verifies the email

Registration:
On the registration page, use the security assist random password feature to create a random string Store the random string in a session variable.

In the insert Record behavior, set the new randomString column to use the session variable value.

The Insert record behavior will store ID of the new record in a session variable, make note of the session variable name in the Store As section of the Insert Record behavior.

Registration Email:
the registration email will have a link to the usrConfirm page. this link will pass the UserID session variable and the random string session variable as querystring variables:

userConfirm.php?id=<UserID Session value>&randomString=<random string session value>

userConfirm.php:
The userConfirm.php page will have a recporset to filter the userID column on the ID querystring value and the randomString column on the randomString querystring value.

also an Update record behavior that is triggered if the recordset is not empty to update the emailVarified column to 1.

Login:
On the login page, edit the authenticate user behavior, On the second step, click the plus button to add another condition. Select the emailVarified column and set the value to 1.

This will cause login to pass only if the emailVarified gets updated to 1.


The User registration solution pack uses this method. If you examine the registration process in the User Registration solution pack, It will demonstrate how this is all put together.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...