Email verification plugin

gemlog 02 Nov, 2009
Now that I am up to this part of my little project I finally noticed this plugin :-)

I thought I would have to code all that part, so nice to find it.

So, is vlink a field I make on the form? and I put it in my form table. I was going to generate an md5 sum on a couple of fields, but maybe this is done already?

Sorry, I just can't find much to read about that plugin. Please point me somewhere if I've just missed it.
GreyHead 02 Nov, 2009
Hi gemlog,

You can put {vlink} into your email template to show the link.


PS There seem to be some problems with the plugin reported in a couple of other threads. Let us know if you find anything that doesn't work correctly.
gemlog 02 Nov, 2009
So chrono generates a unique code and then puts it where? It is really late for you, so I will quit bugging you and let you get some sleep! I'll go read your plugin code and stop being so lazy :-)
GreyHead 02 Nov, 2009
Hi gemlog,

Help for Email Verification plugin
The plugin allows you to send an email to the user containing a verification link. When they click the link a database table is checked and updated to confirm their e-mail address is valid.

* Choose the table you want to use to record the verifications in the Configuration tab. NB the table **must** include columns for the ChronoForms UID and a TINYINT column to record the verification. If either of these columns ar not present the Plugin will not work correctly.
* Select a column name in the second dropdown to record the verification. Only TINYINT columns will be shown NB This drop-down will not appear until you select a table in the first drop-down.
* On the E-mail Settings tab enter the header values for the verification email. Normally you will use the Dynamic To box to enter a field name from your form for the email address to be verified and static Subject, From Name and From E-mail Address values.
* If you want to use Dynamic values for the Subject or other fields enter them in the Advanced boxes and leave the recommended boxes empty.
* On the E-mail message tab enter the text of the email you want to send. You can use {field_name} to include input values from your form. You should also add {vlink} to include the verification link. You can disable the rich-text editor in the configuration tab.
* On the Extra Code tab you can enter code to be run before the email is sent, or after the verification link is clicked. The code can include HTML which will be displayed and PHP inside tags.
* Once this plugin is configured you must enable it in the Form 'Plugins'' tab.

From the Help Tab (your version may not have one, and may be slightly different).

gemlog 03 Mar, 2010
3.1 RC5.5

Took me a while to get around to it. The emailing and verification part works and updates the table fine. No problems at all -- you know, once I actually /enabled/ the plugin :-)

I will edit this post on success/fail with the before and after triggers.
gemlog 26 May, 2010
OnSubmit After Verification - Success:


OnSubmit After Verification - Already verified:

both execute the 'Already verified' one and the 'Success' one never gets hit. This may have been said somewhere already.
mus1402 20 Oct, 2011
I still don't understand how to use this "Email Verification" plugin for V3.

Could someone explain to me in simple English how does it work? and also could your suggest me some good step-by-step tutorial or video(even better) ?

Many thanks
GreyHead 17 Dec, 2011
Hi mus1402,

The Email verification plug-in is fairly simple. You may need to add more code to get it to do what you need.

You create a database table to save the form date and make sure that it includes a column of Type TINYINT or BOOL to contain the verification flag.

When the plug-in runs it sets the column value to 0 and sends and email with a link.

When the link is clicked the form is relaoded and the column value is set to 1.

That's all there is to it.

You can add extra code actions around it using the boxes on the onSubmit Code tab.

hernacar 31 Dec, 2011
I was looking for clarification on this, as I am having some difficulty getting this quite right:
I have created a custom registration form with some additional fields. In the OnSubmit event I added the Joomla Registration action with the "Require Activation" option set to "Yes" and the "Send verification e-mail" set to "No". Within the On Success part, I added the E-Mail verification sender action, and this is where I'm running into a bit of a mess:
Obviously, the Joomla Registration action will store the bits that it needs to store (full name, e-mail, password, etc.) based on the field names I pass it to the default joomla users table (default table). I then store the complete form into my custom table using a DB Save action. If I select default for the table to use in the E-Mail verification action, I noticed that there would be two entries in it. The first looked like a successful registration with the block field set to 1 (TRUE, as in not activated yet) and a code in the activation field. The second entry had the password unencrypted, and the activation field was blank.
If I then select the custom table in the E-Mail action, everything looks to be okay up until the verification link is generated. The code in the hash parameter of the link matches that of the custom table, but not that of the default table. What this means to me is that I now have to do additional work (code) to update the default table to unblock the user and remove the activation code from the database. So, really, my question is this:
Can I somehow get the codes to match so that the E-Mail Response is simpler to handle (I can just set it to look up the default table and enable the user), or am I stuck having to load db records and updating them? I've already tried to accomplish this by putting this line in a bit of custom code: $form->data['activation'] = $form->data['_PLUGINS_']['joomla_registration']['activation']. This, to my dismay, did not work...

Thanks a whole bunch in advance.
gemlog 31 Dec, 2011
Hey hernacar. Sorry, I got a bit lost there because it's late after skiing + beer, but it looks like you are doing more work than you need to do with chronoforms and email verification.

How about do this little form to just take one complication out (the joomla registration), so you can watch it work:

- make a form to store anything at all, say sandwich and beer preference
- add the boolean field needed to the db
- click the left box to select your form from the main list and then the email verification plugin on the far left of the screen; configure that.
- back in your form go and enable that plugin
- that should be it

Sorry if my beer goggles missed something important up there, but that's how I use it and it works great. My own email verification form triggers an email to a third party, not a joomla registration, but it should come out to the same thing. Works a treat.
GreyHead 31 Dec, 2011
Hi hernecar,

It looks as though gemlog is writing about CFv3 and you are using CFv4 so the plug-ins are now actions. That said, his advice is still good.

I'm more confused by whay you need to use the Email Verification action with Joomla! Regitration when the registration already includes an email verification option. Wouldn't it be simpler to use that?

hernacar 31 Dec, 2011
Gemlog and Bob,

Thanks for your response. I will give that a try.

To answer your question Bob: Yes, it would be easier to just use the Joomla Registration e-mail verification system. However, it doesn't leave me with too much room for custimization, which is what I was hoping to accomplish with CF. And in this process, the only thing that's "breaking" is that the verification codes don't match...

But I just had a thought: Could I adjust the native Joomla user module to redirect the user to my user verification form?
GreyHead 02 Jan, 2012
Hi hernacar,

The ChronoForms Registration includes the ability to use the Joomla! Email verification and to use a custom email so I'm not clear what customisation you can't do??

hernacar 02 Jan, 2012
Hey Bob,

If I use the built in Joomla verification link, it sends me to the core user registration validation page. I don't know where to go to change the thank you message to something else.

If I use the custom E-mail verification action (plugin for v3 users), the hash (or token, as the core user component calls it) that is appended to the custom link is different than the one stored in the default user table; therefore I cannot validate against it. Additionally, the core users component "block" field is set to 1 for True (block the user from logging in), and 0 for FALSE (the user is registered and verified and can now log in). The CF E-Mail verification response has these values reversed, it puts a 1 in that field when the user has validated the account, which is not the value you want in the #__users table.

I'm working on a band-aid right now. I'll let you know how it goes.
This topic is locked and no more replies can be posted.