You are here

function og_unsubscribe_user_action in Organic groups 6

Same name and namespace in other branches
  1. 6.2 modules/og_actions/og_actions.module \og_unsubscribe_user_action()

A configurable action to unsubscribe a user from a specific group.

File

modules/og_actions/og_actions.module, line 272

Code

function og_unsubscribe_user_action($account, $context) {
  if (isset($context['group'])) {
    og_delete_subscription($context['group'], $account->uid);
    watchdog('action', 'Unsubscribed user %name to %group.', array(
      '%name' => $account->name,
      '%group' => $context['group'],
    ));
  }
}