You are here

function hook_invite_accept_alter in Invite 7.4

Alter invite_accept message, type and redirect.

1 invocation of hook_invite_accept_alter()
invite_accept in includes/invite.pages.inc
Invitation accept callback.

File

./invite.api.php, line 95
Hooks provided by the Invite.

Code

function hook_invite_accept_alter($data) {
  $invite = $data['invite'];
  if (!empty($invite->data['gid']) && INVITE_VALID === $invite
    ->status()) {
    $data['redirect'] = 'node/' . $invite->data['gid'];
    $data['message'] = t('Please login or register for an account to begin working on this item.');
    $data['type'] = 'error';
  }
}