function og_promote_user_action in Organic groups 6
Same name and namespace in other branches
- 6.2 modules/og_actions/og_actions.module \og_promote_user_action()
A configurable action to promote a user to a group administrator.
File
- modules/
og_actions/ og_actions.module, line 320
Code
function og_promote_user_action($account, $context) {
if (isset($context['group'])) {
og_save_subscription($context['group'], $account->uid, array(
'is_admin' => 1,
));
watchdog('action', '%name was promoted to <em>group administrator</em> in %group.', array(
'%name' => $account->name,
'%group' => $context['group'],
));
}
}