Skip to main content
March 18, 2008
Answered

Validating email in CF

  • March 18, 2008
  • 2 replies
  • 606 views
Hi,

I am creating an application that needs an email verification when user creates an account into the app, I need to send the link with the user_id as attached parameter so when they click on the link they will be validated into the database. The problem is that the link is sending like this
http://www.app.com?user_id=12
Is that correct? I've seen that the links like this use some kind of encryption. I don't know how to create it.

This topic has been closed for replies.
Correct answer
Thank you, I did that and worked perfect-

2 replies

Participating Frequently
March 20, 2008
Using GetTickCount() would be also an alternative instead of generating UUIDs. :)

<cfset authID = GetTickCount() />
Participating Frequently
March 18, 2008
If the user is malicious, they could issue a bunch of url's.

http://www.app.com?user_id=12
http://www.app.com?user_id=13
http://www.app.com?user_id=14
http://www.app.com?user_id=15
http://www.app.com?user_id=16
etc...

What you could do is store a UUID in a column in your database then use that as part of the url for authenticatiion.

If you're trying to prevent spammers from authorizing a bunch of emails, you'll need to step up the process a bit and include something like a CAPTCHA.
Participating Frequently
March 18, 2008
I was going to post what c_wigginton said. Do that. :)
Correct answer
March 19, 2008
Thank you, I did that and worked perfect-