function oa_users_add_external_user_render in Open Atrium Core 7.2
Render callback for the add external user plugin.
1 string reference to 'oa_users_add_external_user_render'
- oa_users_add_external_user.inc in modules/
oa_users/ plugins/ content_types/ oa_users_add_external_user.inc
File
- modules/
oa_users/ plugins/ content_types/ oa_users_add_external_user.inc, line 21
Code
function oa_users_add_external_user_render($subtype, $conf, $args, $context = NULL) {
if (empty($context->data->nid) || !(($nid = oa_core_get_group_from_node($context->data)) && ($group = node_load(oa_core_get_group_from_node($nid)))) || !node_access('view', $group) || !og_user_access('node', $group->nid, 'add external user')) {
return;
}
ctools_include('modal');
ctools_modal_add_js();
// A simple form with a button.
$form = drupal_get_form('oa_users_add_external_user_button', $context->data);
$output = drupal_render($form);
$block = new stdClass();
$block->title = t('Add External User');
$block->content = $output;
return $block;
}