function og_subscribe_user_action in Organic groups 6
Same name and namespace in other branches
- 6.2 modules/og_actions/og_actions.module \og_subscribe_user_action()
A configurable action to subscribe a user to a specific group.
File
- modules/
og_actions/ og_actions.module, line 226
Code
function og_subscribe_user_action($account, $context) {
if (isset($context['group'])) {
og_save_subscription($context['group'], $account->uid, array(
'is_active' => 1,
));
watchdog('action', 'Subscribed user %name to %group.', array(
'%name' => $account->name,
'%group' => $context['group'],
));
}
}