close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

verify account setup by UE

Thread began 10/08/2009 4:46 pm by JBWebWorks | Last modified 11/12/2009 3:01 pm by carlene | 3094 views | 8 replies |

JBWebWorks

verify account setup by UE

Looking for PHP code to use UE to send auto email to verify a registration of account.

I know how to set up a registration form and how to get UE to send auto email to email address filled in the registration form.
Want to know what link to send with the auto email that a person clicks on to verify their account; and how clicking on that link performs the validation.

thanks
Jim Balthrop

Sign in to reply to this post

tom92909Beta Tester

I did that very thing recently. This will require some hand coding maybe, but you should be able to do all if it with DataAssist, Security Assist & Universal Email.

I made the email address the unique account identifier.
I require at least an email address and a password.

In MySQL I have a user table that looks like this...

php:
CREATE TABLE IF NOT EXISTS `users` (

  `UserID` int(11) NOT NULL auto_increment,
  `UserName` varchar(50) default NULL,
  `UserPassword` varchar(50) default NULL,
  `UserEmail` varchar(100) default NULL,
  `UserDate` datetime default NULL,
  `FirstName` varchar(50) default NULL,
  `LastName` varchar(50) default NULL,
  `UserIsAdmin` tinyint(1) default NULL,
  `BillingName` varchar(50) default NULL,
  `BillingAddress1` varchar(50) default NULL,
  `BillingAddress2` varchar(50) default NULL,
  `BillingCity` varchar(50) default NULL,
  `BillingState` varchar(50) default NULL,
  `BillingZip` varchar(50) default NULL,
  `BillingPhone` varchar(14) default NULL,
  `UserValidated` char(1) NOT NULL default 'N',
  `UserSessionID` varchar(255) default NULL,
  `UserIPAddress` varchar(30) default NULL,
  PRIMARY KEY  (`UserID`),
  UNIQUE KEY `UserEmail` (`UserEmail`);



My registration process only initially populates the UserEmail, Password, UserDate, UserSessionID, UserIPAddress fields. The `UserValidated` has a default value of 'N'. Later in the process that value will change to 'Y' if the user follows the process to completion.

1. Create your standard registration.php, login.php, profile.php, logout.php, forgotpassword.php files using the Security Assist wizard. You'll also want a duplicate_account.php file.

2. The Registration page checks the email address for duplication, if found it redirects to the duplicate page. If not found it inserts a new account in the user table, and using Universal Email sends a welcome message to the new user that has a link embedded in the body of the message. This link includes a SESSION_ID....
Example:
validate_user.php?id=42599f0b88578b93c4d2a935bd2e4bfd

3. You will have to create some informational pages to explain the process to your guest users.

4. You will need to create a validate_user.php file that compares the link and the users current session ID and what was written to the user table moments ago. If they match, then you validate (change the 'N' to a 'Y') if not don't validate and redirect to a new page that explains the failure.

The above is a quick summary of the process. I offer this with the hopes that it will point you in the right direction, but there are probably other ways of doing this, but this is a way that I have found to accomplish the task.

Sign in to reply to this post

JBWebWorks

thanks Tom

i have been working on this and have a question about how the UserIPaddress field is used and how to implement?
i am sure i will have other questions as i get this to work for me.

Jim Balthrop

Sign in to reply to this post

Jason ByrnesWebAssist

The UserIP address is not really 100% necasarry, it is optional info.

To capture it when the user registers, in the insert record server behavior, Select the UserIP Column, click the Lightning bolt next to value and select the REMOTE_ADDR variable from the server collection in the bindings panel.

Sign in to reply to this post

JBWebWorks

thanks Jason

i probably won't use the UserIP

one question in using WA cookies toolkit
in setting the session value, what goes in the value field?;
and if that produces a random session string, how do i get it in the insert record field to identify the user when later validating?

thanks again

Sign in to reply to this post

Jason ByrnesWebAssist

go to the bindings panel.

Click the Plus button and select SecurityAssist -> Random Password.


Then in the set session value server behavior, click the lightning bolt next to value, and select the random password binding.


To store the random string in the DB, use the DataAssist insert record server behavior.

Select the random string column, and bind it to the random string session variable.

Sign in to reply to this post

JBWebWorks

thanks again Jason

works perfectly.

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

Sign in to reply to this post

carleneBeta Tester

This is amazing!

Thank you all for posting this great solution!!

I'm going to try it.

Sign in to reply to this post

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...