I'd like to make tokens available for the invitation message from the user_relationship_invites module. To do this, I can implement hook_token_list and hook_token_values in that module, but I don't have access to the relationship type that was selected when the hooks run. They are not included in the object used to generate tokens, and they are not yet in the database where I can look them up.
The solution I used was to create a form
element of the invitation object with all of the values from the form. Then the token hooks in user_relationship_invites can just pluck the values the module put there out of the form.
A patch is attached.
Comment | File | Size | Author |
---|---|---|---|
invite-form-token.patch | 566 bytes | scottgifford |
Comments
Comment #1
scottgifford CreditAttribution: scottgifford commentedAn example of a some code that takes advantage of this patch is at http://drupal.org/node/542450
Comment #2
ckngCleaning out old issues.