Currently core outputs a hard-coded list of specific tokens, but since it runs the user e-mail text through token_replace() there are a lot more tokens supported than shown. We should replace this with a token tree UI so that it is more helpful to the user. We should also add validation on the token types.

On the more difficult side, there are two dangerous tokens that should be listed on these pages, but not normally elsewhere, user:cancel-url and user:one-time-login-url. We'll have to figure out how to get those tokens to display only on those specific token trees. We may have to add something like #tokens or #extra_tokens in theme_token_tree().

Comments

dave reid’s picture

Status: Active » Fixed

Added basic token tree UI replacement and validation. Also added the hidden user unsafe tokens with parameter 'restricted' => TRUE in token_token_info(). To show restricted tokens in the token tree, you use the parameter show_restricted = TRUE.

Status: Fixed » Closed (fixed)

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