function og_deny in Organic groups 5.3
Same name and namespace in other branches
- 5.8 og.module \og_deny()
- 5 og.module \og_deny()
- 5.2 og.module \og_deny()
- 5.7 og.module \og_deny()
- 6.2 og.module \og_deny()
- 6 og.module \og_deny()
File
- ./
og.module, line 487
Code
function og_deny($gid, $uid) {
$node = node_load($gid);
if (og_is_node_admin($node)) {
og_delete_subscription($gid, $uid);
drupal_set_message(t('Membership request denied.'));
$variables = array(
'@title' => $node->title,
'!group_url' => url("node/{$node->nid}", NULL, NULL, TRUE),
);
$message = array(
'subject' => _og_user_mail_text('og_deny_user_subject', $variables),
'body' => _og_user_mail_text('og_deny_user_body', $variables),
);
module_invoke_all('og', 'user deny', $gid, $uid, $message);
drupal_goto("node/{$gid}");
}
else {
drupal_access_denied();
}
}