Closed (fixed)
Project:
Signup
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
17 Jun 2006 at 15:44 UTC
Updated:
2 Jul 2006 at 02:45 UTC
Jump to comment: Most recent file
this one is a bit tricky. here's how i've decided to handle it:
i considered trying to make the validation for external calls happen automatically inside the signup api itself, but i think given the fapi workflow, it's better to let the calling module perform validation in it's validation cycle--this will allow for the proper setting of form errors, etc.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | anon_signup_validate_0.patch | 4.05 KB | hunmonk |
| anon_signup_validate.patch | 3.85 KB | hunmonk |
Comments
Comment #1
hunmonk commentedhm. posted patch doesn't allow for the case where an external signup doesn't use a form to collect the email. i'll post a fix for that in a bit...
Comment #2
hunmonk commentedok, attached patch is much better. code is cleaner, and it accounts for an external module passing in an anon email that was not gotten from a form.
Comment #3
dwwapplied and (lightly) tested. validation still seems to work for anon signups.
from looking at the code, there *might* be trouble in php with constructs like this:
since i've heard (i think) that if
$form_values['signup_anon_mail']is undefined, the above throws a warning, instead of just treating undefined as FALSE.if someone with php5 confirms this is a problem, we can fix it later. ;)
thanks,
-derek
Comment #4
hunmonk commentedapplied ot 4.7 and HEAD.
Comment #5
(not verified) commented