function invite_token_values in Invite 5
Same name and namespace in other branches
- 5.2 invite_token.inc \invite_token_values()
- 6.2 invite_token.inc \invite_token_values()
Implementation of hook_token_values().
File
- ./
invite.module, line 1123 - Allows your users to send and track invitations to join your site.
Code
function invite_token_values($type = 'all', $object = NULL) {
$values = array();
if ($type == 'invite' && is_object($object)) {
// NOTE: Invite is currently only capable of sending plain text e-mails.
// If you intend to change that, you need to properly escape all user input
// by adding check_plain() around below values!
$values['inviter-raw'] = $object->inviter->name;
$values['invite-mail'] = $object->email;
$values['invite-message-raw'] = $object->data['message'];
$values['join-link'] = url('invite/accept/' . $object->code, NULL, NULL, TRUE);
}
return $values;
}