The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
![]() |
Using encrypted version of submissionID as variable on email with Hooks Manager? - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: Using encrypted version of submissionID as variable on email with Hooks Manager? (/showthread.php?tid=1891) |
Using encrypted version of submissionID as variable on email with Hooks Manager? - bagpiper - Feb 7th, 2012 Hi all, Going through various forum topics I learned that what I'm trying to do may be doable with the Hooks Manager Module. All I'm trying to do is to encrypt the submissionID value and use it in an email template that is sent back to a user filling out a form. Then, the encrypted submissionID value would be used to refer back to the actual user that filled the form so we can "activate" a feature of our system (software downlad). Of course, the URL used for activation will be completely independent of formtools, since I don't think we can define a logic for our process (or can we?) At any rate, I'd like to know if with the Hooks module I will be able to pick this submissionID value (created upon a form submission) and then apply my encryption function to create the appropriate email. Thanks a lot for your guidance and tips. Marty RE: Using encrypted version of submissionID as variable on email with Hooks Manager? - Ben - Feb 11th, 2012 Hey Marty, Interesting! What kind of encryption were you thinking of using? My immediate thought was just to encrypt the submission ID right in the email template. This would just be something like: Code: {$SUBMISSIONID|sha1} Would that help at all, or would you need two-way encryption? - Ben RE: Using encrypted version of submissionID as variable on email with Hooks Manager? - bagpiper - Feb 22nd, 2012 Thanks Ben, Yes, I would do it two-way, so that the email sent out by the system has a URL link with a URL parameter using the encrypted value. The php file that receives this call then needs to decrypt the value for the logic to do what it needs. What I don't find very clear with formtools is how to go about doing the logic for receiving this URL call. My thinking was to just create a separate/independent php file that takes care of updating the value of a db entry which is all I need. Cheers, Marty RE: Using encrypted version of submissionID as variable on email with Hooks Manager? - Ben - Feb 24th, 2012 Hey Marty, Quote:What I don't find very clear with formtools is how to go about doing the logic for receiving this URL call. My thinking was to just create a separate/independent php file that takes care of updating the value of a db entry which is all I need. Exactly, that's how I'd approach it. It's a pretty custom situation, so there really isn't a way to handle it well from within the existing code. In your file, just include the /global/library.php to get access to all the Form Tools functions. That may well help cut down on unnecessary code. Regarding the two-way encryption, any idea how you'd approach that (PHP-wise)? Just curious: this is something that I've wondered about myself a couple of times. I haven't encountered any built-in encryption methods that aren't one-way. But you can probably do it right in the email template, similar to how to showed above. Anyway, good luck with it! - Ben |