There's a couple bugs with the current implementation of role_change_notify():
1. The token does not get properly listed under the 'tokens' array of hook_token_info().
2. Corrected to use the proper token standard of using a dash rather than underscore (user:role-changed instead of user:role_changed).
3. Since the user:role-changed token may be changed on other user objects like [node:author:role-changed] or [current-user:role-changed] we need to ensure that we provide the proper token replacement value, which is $tokens['role-changed'] in the $replacements array().
4. Token help UI has changed to use the token tree.
5. If token module is installed, why not use the token validation. :)
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 944268-rcn-token-cleanup.patch | 8.5 KB | dave reid |
| #7 | 944268-rcn-token-cleanup-D7.patch | 8.5 KB | dave reid |
| #2 | 944268-rcn-token-cleanup-D7.patch | 8.57 KB | dave reid |
Comments
Comment #1
rfayIt wasn't an idle threat when he said he would seek us out!
Comment #2
dave reidAlso, we need to make sure the role-changed token is sanitized when requested.
Comment #4
rfayI just re-tested HEAD, and it's been broken. Last tested in March! So I imagine all these are #fails from core shift.
Comment #5
rfay#944290: HEAD is broken
Comment #6
rfay#2: 944268-rcn-token-cleanup-D7.patch queued for re-testing.
Comment #7
dave reidRe-rolled for latest changes.
Comment #8
dave reidGRRRRRRRRR
Comment #9
rfayCommitted: http://drupal.org/cvs?commit=461028
Muchas, muchas gracias.