function group_membership_unblock in Group 7
Group membership unblock callback.
1 string reference to 'group_membership_unblock'
- group_group_member_operations in ./
group.group.inc - Implements hook_group_member_operations().
File
- admin/
group_membership.inc, line 449 - Group membership overview admin UI.
Code
function group_membership_unblock($mids) {
$count = 0;
foreach (group_membership_load_multiple($mids) as $group_membership) {
if ($group_membership->status == 'blocked') {
$group_membership->status = $group_membership->blocked_status;
$group_membership->blocked_status = '';
$group_membership->blocked_on = NULL;
$group_membership->blocked_by = NULL;
$group_membership
->save();
$count++;
}
}
$message = format_plural($count, 'Unblocked 1 member.', 'Unblocked @count members.');
drupal_set_message($message);
}