You are here

function ginvite_user_decline in Group 7

Accept a pending group invitation.

Parameters

Group $group: The group the invitation is for.

object $account: The user the invitation is for.

GroupMembership|false $group_membership: The group membership object for the invitation.

1 string reference to 'ginvite_user_decline'
ginvite_group_membership_action_info in modules/ginvite/ginvite.group.inc
Implements hook_group_membership_action_info().

File

modules/ginvite/ginvite.group.inc, line 131
Hook implementations for the Group module.

Code

function ginvite_user_decline(Group $group, $account, $group_membership) {
  $group_membership
    ->delete();
  drupal_set_message(t('You have declined the group invitation.'));
}