function og_access_form_alter in Organic groups 5.3
Same name and namespace in other branches
- 5.8 og_access.module \og_access_form_alter()
- 5 og_access.module \og_access_form_alter()
- 5.7 og_access.module \og_access_form_alter()
- 6.2 modules/og_access/og_access.module \og_access_form_alter()
- 6 modules/og_access/og_access.module \og_access_form_alter()
Implementation of hook_form_alter().
File
- ./
og_access.module, line 161
Code
function og_access_form_alter($form_id, &$form) {
if (isset($form['#node']) && $form_id == $form['#node']->type . '_node_form') {
drupal_add_js(drupal_get_path('module', 'og_access') . '/og_access.js');
$node = $form['#node'];
if (og_is_group_type($node->type)) {
og_access_alter_group_form($form, $node);
}
else {
og_access_alter_nongroup_form($form, $node);
}
}
}