Tokens that vary between messages (for example: node-invite-iid, ..-recip-name, ..-recip-mail) do not change when sending multiple invites at once. For example, if I have the subject:
"[node-invite-recip-name], you've been invited!!"
and my email input is:
John Doe|doe@gmail.com
Mike Smith|msmith@gmail.com
Then both users will receive a message with the subject:
"John Doe, you've been invited!!"
This is not technically a bug in the node_invite module, but an issue in the token module. See #262360: Expose control of token caching to functions that call token_replace this issue depends on that patch. Once it's in token then the code:
$replaced_message = token_replace( $new_default_message, 'node', $node );
$replaced_message .= "\n<BR>" . token_replace( $form_state['values']['personal_message'], 'node', $node );
Should be changed to:
$replaced_message = token_replace($new_default_message . "\n<br />" . $form_state['values']['personal_message'], 'node', $node, '[', ']', array(), TRUE);
The last TRUE in that call will flush the token cache on each sent email to ensure that each email is populated with a fresh set of values.
Comments
Comment #1
hadsie commentedThis is now committed to the 2.x branch of the module. You'll need the dev version of the token module for it to work properly though.