I'm using your plugin for the first time, and I'm starting to get a handle on it. I managed to get tracking going ;) and I guess I'll be able to work get my forms to look the way they#re supposed to.
But what I desperately need to do is create registration forms where the user gets an email with a link inside to actually activate his registration. This is for a huge, international event with people coming from all over the globe, and we'd need to make sure nobody gets signed up without knowing it.
So I found a thread where you outlined the creation of a link … but I am having trouble doing it. First of all, the tracking table is totally weird – I was thinking of a mysql "update table set validation=true where email=theemail & id =theid" or something similar.
But now I see I need to create some kind of unique code for that specific user, somehow manage to get it inside the confirmation email.
I am confident I'll be able to handle the validation script, but could you explain to me in some detail, how to get cforms to do this?
Since this is a job where I will make a few bucks I'll gladly donate a percentage, by the way.
Danke im Voraus!
PS: is there a way to see this forum without the other stuff on the side? Or maybe get make it a little wider?
Oliver, do you think this is a "secure" solution? I want to prevent people from playing around with the variables and activating people without them knowing.
I noticed Oliver's not big on providing code up-front but very helpful to iron out the bugs.
hm, since you brought it up: 'not big on providing code up-front' – well, you got cforms right??? how much more code at no cost would you like 'up-front' and how much more support for free do you want on top? unfortunately most users are 'not big on providing donations' either (not too worry, I noticed your offer on percentage).
So here's what I have:
thanks for sharing what you got.
In the form, add a hidden field called "validated" with default value 0.
In the Auto Confirmation email I put this at the bottom:
Oliver, do you think this is a "secure" solution? I want to prevent people from playing around with the variables and activating people without them knowing.
why don't you add a custom key (generated at run-time in my-functions.php) to the URL and store it in the DB as an extra value when sending out the auto conf. when the user now clicks the URL/link your PHP code first fetches that key, compares it and then signs up the user…much more secure.
hm, since you brought it up: 'not big on providing code up-front' – well, you got cforms right??? how much more code at no cost would you like 'up-front' and how much more support for free do you want on top? unfortunately most users are 'not big on providing donations' either (not too worry, I noticed your offer on percentage).
Argh. Sheesh, that's not what I meant. Sorry I brought it up, your plugin is greatly appreciated, as is the fact that you're running a support forum!
And I stand by my donation offer … once I myself get paid ;)
why don't you add a custom key (generated at run-time in my-functions.php) to the URL and store it in the DB as an extra value when sending out the auto conf. when the user now clicks the URL/link your PHP code first fetches that key, compares it and then signs up the user…much more secure.
I looked into that but really found no way to do it. I'm totally lost when it comes to the my-functions.php. The custom key thing would have been my prefered method. Can you give me a hint as to where in the my-functions I need to look? Is it a setting I set in line number 99 or an input filter starting at line number 129?
check out the 'my_cforms_logic' routine, which you need to fully uncomment (everything is commented out in this file!), and then modify the section around the auto confirmation (~line 47). You only want to use the filter for "autoConfTXT" and replace a placeholder in the orig text with a random key. That key you also need to write to the DB (SQL insert). The record ID should be accessible via $subID which you have to define as a global variable inside, at the beginning of my_cforms_logic().
So in the form builder I insert a "+++thisisaplaceholder+++" and then change that to something random.
I found a code somewhere that produces a nice random key, I think. If anyone needs it
function rand_text($min=10,$max=20,$randtext='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'){if($min<1)$min=1;$varlen=rand($min,$max);$randtextlen=strlen($randtext);$text='';for($i=0;$i<$varlen;$i++){$text.=substr($randtext,rand(1,$randtextlen),1);}return$text;}
(hmmm, that's not how I entred it. Should be more than one line.)