The attached patch allows modules to implement a hook to provide extra tokens for user emails.

There is a simple module_implements addition to user_mail and also to help text in user_admin_settings to show available tokens.

It is backwards compatible and works fine with only the user_mail_tokens implementation.

DT

Comments

mnlund’s picture

Voting for this one!

PWG’s picture

And here's my vote! Thanks, davidwhthomas!

PWG

dyesdyes’s picture

Thanks !
Works perfectly !

Little help for beginners :

use the hook :

function yourModuleName_mail_tokens($type, $object = NULL, $options = array()) {
$tokens['id'] = value;
return $tokens;
}
Hope it will help someone,

thanks again for the patch

plopesc’s picture

I vote it too!!

Status: Active » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.