You are here

function group_membership_decline in Group 7

Group membership decline callback.

1 string reference to 'group_membership_decline'
group_group_member_operations in ./group.group.inc
Implements hook_group_member_operations().

File

admin/group_membership.inc, line 409
Group membership overview admin UI.

Code

function group_membership_decline($mids) {
  $count = 0;
  foreach (group_membership_load_multiple($mids) as $group_membership) {
    if ($group_membership->status == 'requested') {
      $group_membership
        ->delete();
      $count++;
    }
  }
  $message = format_plural($count, 'Declined 1 membership request.', 'Declined @count membership requests.');
  drupal_set_message($message);
}