Posted by dww on August 14, 2009 at 9:38pm
2 followers
| Project: | Signup Status |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | dww |
| Status: | closed (fixed) |
Issue Summary
While working on #228159: Custom emails sent upon status change I decided it'd be nice to just use token.module for the token replacement stuff in signup_status_mailer. To do so, we need to expose some signup_status 'signup' tokens (which will be supported directly by various signup-related modules) for data contained in a specific signup. Stay tuned for a patch.
see also #549646: Expose signup-related node and signup values to token.module
Comments
#1
#2
Now with filter_xss(), just to be safe. The status name and description are entered by admins, not end users, but still. Since these tokens are used in plain text email, check_plain() isn't really what we want (and in fact, we don't even care about filter_xss(), either). However, if other modules start using these tokens in an HTML context, better safe than sorry...
#4
Upon further discussion, seems better to provide both regular and raw versions of these tokens, and let customers decide which to use as needed.
#5
Now without the PHP syntax error. ;)
#6
After more elaborate testing, there are cases where
$signup->statusis empty (e.g. users who signed up for something before signup_status was enabled, etc). So, now we're a little more careful about initializing those token values to avoid PHP notices.#7
Given the review(s) by greggles and more testing from me, committed to HEAD.
#8
Followup: Looking more closely at the default core tokens provided by token.module, it seems like '-' is used more frequently as the delimiter inside token names, not '_'. So, I just committed a change to switch from, e.g. [signup_status] to [signup-status] to HEAD.
#9
Automatically closed -- issue fixed for 2 weeks with no activity.