You are here

function ginvite_decline_callback in Group 7

Act upon declining a group invitation from the user page.

See also

ginvite_user_page()

1 string reference to 'ginvite_decline_callback'
ginvite_menu in modules/ginvite/ginvite.router.inc
Implements hook_menu().

File

modules/ginvite/pages/ginvite.inc, line 103
Group member invite callback and pages.

Code

function ginvite_decline_callback($account, Group $group) {
  $group_membership = $group
    ->getMember($account->uid);
  $group_membership
    ->delete();
  drupal_set_message(t('You have declined the group invitation.'));
  drupal_goto("user/{$account->uid}/group/invite");
}