2

I'm looking for ideas on how to implement this, even if it means building stuff custom. Basically, the flow goes like this:

  • A visitor goes to the site and wants access to some downloadable content
  • Visitor has to submit contact info (think lead-gen form) to get a 4-digit PIN
  • 4-digit PIN should be auto-generated per visitor/form filled out
  • 4-digit PIN is used by visitor to "login" to downloadable content area
  • If visitor forgets their PIN, a "forgot PIN/password" function is needed.

Obviously, this sounds like member registration with custom fields (using Zoo Visitor most likely) would do the trick, but the gotcha is with the 4-digit PIN - it must be 4-digits/characters and it must be auto-generated for the visitor and subsequently emailed*.

Also, when logging in to the protected area, all that should be entered is a PIN. No username. (Is that possible?)

Is there an add-on that will auto-generate the PIN and send the email upon successful sign-up? Any other ideas also welcome. :)

*I realize that sending PINs/passwords via email is a security no-no but it's needed in this case and there's no personal data accessed on the front-end of the site.

2

I once created something similar for an EE1 site where people submit their email address and get back a pin code--though they get the code on the sign-up thank-you web page, not via email.

I used this open source alphaID function for generating the pin codes.

I've used this specifically to generate 4 digit pin codes, and I'm pretty sure you can use the function to always generate 4 alphanumeric characters.

It should be a good starting place for your code generation, if it's isn't an exact match.

For emailing the code, I've never tried using a PHP function in a FreeForm notification template--that might work. But, I'd also look at MX Notify Control and Postmaster.

| improve this answer | |
1

Although you could utilise native login/zoo visitor (although I'd recommend Freemember). I'm not sure how you'll cope with sending out the password and auto generating it, although you could look at trying to fire off the reset password (so a dummy random password is created initially then the user is requested to set the password which is really resetting your temp password), unless you ask them for a password initially. The username would be the PIN number. Then you have to handle tracking of the user (if they've downloaded it for example).

The tricky bit would be generating a unique PIN, but you could write an add-on that checked existing usernames and generated a new unique one.

Otherwise custom route, but you don't need to really utilise member management.

You'll need a module, that creates a table with the unique index as the 4 digit PIN and password - either encrypted or as if (if there's no security implications). You could extend to hold user info, access counts, etc.

In your form for the "request access" the module generates a unique (available) PIN and password, these are then submitted to an ACT url picked up by the module and saved to the database. Slight risk in case there's 2 random numbers chosen at the same time and it tries to save them - but there may be tweaks you can make to avoid that.

Then you create another form in your template that submits to another module ACT url that takes the info supplied by the user and compares to the DB info to either verify and allow access to the download, or deny.

Obviously you can extend or simplify for your needs.

This is a useful add-on for sending out emails from a template: Email from Template

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.