Validation Link

Dear GF Community,

I am looking for a way to implement something very similar to how the User Registration add-on already works in terms of sending the form submitter an activation link. My usage case is one in which I want added protection against spam submissions and to require the user to provide a valid email address. In other words, the user would complete the form, click Submit, and then receive a notification with a validation link. He/she would need to click on the validation link in the email notification in order for the form submission to be finalized.

The User Registration add-on already provides this functionality and works very well for such a purpose, but in this case I don’t need to create users. I am simply trying to increase the probability that a form submission is genuine and require the user to click on a link before it is considered final.

I would appreciate any suggestions for how to achieve such an outcome. Thanks!

Why not use that feature of the User Registration add-on, since it is already working for you, and then just assign them no role on the site, or delete the user after they are created?

Thanks, I had the same thought but was looking for something that would not create a user and require later deletion. However, if there are no easy alternatives available, then that’s what I will do.

Perhaps you would consider this as a feature request. The functionality works extremely well and has broader usage potential than only user registration.

Thanks,
Rob

1 Like

Hi @verysiberian !

I solved a complementary use case with a bit of PHP code - here is what it does:

  1. An anonymous visitor clicks a link on my site
  2. That link calls a PHP app endpoint, which creates a new “demo” user
  3. The code also assigns that user a special “role” that is only for this use case
  4. The code then calls a function to remove all aged users with that role

You can try it out here: https://wp.www-net.com (at very bottom)

For your requirements, you could modify this to run as a cron job even. Lots of options really.

LMK if you would like to see the code, I could upload it to my GitHub repo

Cheers,
-JAS

1 Like

Thank you very much, James! I will check this out.

I just realized I failed to mention the one critical event the app performs:

Auto-log the user into the new account.
Maybe that is obvious when you try the demo, but it’s essential to your use case !

Cheers,
-JAS

1 Like