You are here

function og_approve_user_action in Organic groups 6

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

A configurable action to approve a user from a group administrator.

File

modules/og_actions/og_actions.module, line 416

Code

function og_approve_user_action($account, $context) {
  if (isset($context['group'])) {
    og_save_subscription($context['group'], $account->uid, array(
      'is_active' => 1,
    ));
    watchdog('action', "Approved user %name's subscription to %group.", array(
      '%name' => $account->name,
      '%group' => $context['group'],
    ));
  }
}