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. :)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rfay’s picture

It wasn't an idle threat when he said he would seek us out!

Dave Reid’s picture

Status: Active » Needs review
Issue tags: +token
FileSize
8.57 KB

Also, we need to make sure the role-changed token is sanitized when requested.

Status: Needs review » Needs work

The last submitted patch, 944268-rcn-token-cleanup-D7.patch, failed testing.

rfay’s picture

I just re-tested HEAD, and it's been broken. Last tested in March! So I imagine all these are #fails from core shift.

rfay’s picture

rfay’s picture

Status: Needs work » Needs review

#2: 944268-rcn-token-cleanup-D7.patch queued for re-testing.

Dave Reid’s picture

Re-rolled for latest changes.

Dave Reid’s picture

GRRRRRRRRR

rfay’s picture

Status: Needs review » Fixed

Committed: http://drupal.org/cvs?commit=461028

Muchas, muchas gracias.

Status: Fixed » Closed (fixed)
Issue tags: -token

Automatically closed -- issue fixed for 2 weeks with no activity.