You are here

function hook_invite_accept in Invite 7.4

Same name and namespace in other branches
  1. 7.2 invite.api.php \hook_invite_accept()

Allow other modules to act when invite accepted.

Parameters

Invite $invite: Invite object.

1 function implements hook_invite_accept()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

invite_notifications_invite_accept in modules/invite_notifications/invite_notifications.module
Implements hook_invite_accept().
1 invocation of hook_invite_accept()
invite_invite_update in ./invite.module
Implements hook_invite_update().

File

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

Code

function hook_invite_accept($invite) {
  global $user;

  // Add message, when user accepts invite.
  $message = array(
    'iid' => $invite->iid,
    'uid' => $invite->uid,
    'inviter' => $invite->uid,
    'invitee' => $invite->invitee,
    'message_type' => 'inviter_notification',
  );
  drupal_write_record('invite_notifications', $message);
}